예제 #1
0
파일: ttc.py 프로젝트: Pranav1210/tctoolkit
    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))
예제 #2
0
파일: ttc.py 프로젝트: Pranav1210/tctoolkit
    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 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))