def write(self, fname): ''' write the Cooccurence matrix to html file <fname> ''' with FileOrStdout(fname) as outf: jsdir = getJsDirPath() # read the text of d3js file d3jstext = readJsText(jsdir, ["d3js", "d3.min.js"]) outf.write(self.outputHtml(d3jstext))
def _run(self): self.dirname = self.args[0] tagcld = D3SourceTagCloud( self.dirname, pattern=self.pattern, lang=self.lang) jsdir = getJsDirPath() with FileOrStdout(self.outfile) as outf: # read the text of d3js file d3jstext = readJsText(jsdir, ["d3js", "d3.min.js"]) d3cloud_text = readJsText(jsdir, ["d3js", "d3.layout.cloud.js"]) outf.write(OutputTagCloud(tagcld, d3jstext, d3cloud_text))
def _run(self): self.dirname = self.args[0] tagcld = D3SourceTagCloud(self.dirname, pattern=self.pattern, lang=self.lang) jsdir = getJsDirPath() with FileOrStdout(self.outfile) as outf: # read the text of d3js file d3jstext = readJsText(jsdir, ["d3js", "d3.min.js"]) d3cloud_text = readJsText(jsdir, ["d3js", "d3.layout.cloud.js"]) outf.write(OutputTagCloud(tagcld, d3jstext, d3cloud_text))