コード例 #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
ファイル: ccom.py プロジェクト: Pranav1210/tctoolkit
 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))