示例#1
0
 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))
示例#2
0
    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))
示例#3
0
    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))