Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: third_party/twisted_8_1/twisted/lore/texi.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/twisted_8_1/twisted/lore/texi.py
diff --git a/third_party/twisted_8_1/twisted/lore/texi.py b/third_party/twisted_8_1/twisted/lore/texi.py
deleted file mode 100644
index 2763951c01e6c95d563cf7ef49a973e34cbe659a..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/lore/texi.py
+++ /dev/null
@@ -1,109 +0,0 @@
-# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
-# See LICENSE for details.
-
-#
-
-from cStringIO import StringIO
-import os, re
-from twisted.python import text
-from twisted.web import domhelpers
-import latex, tree
-
-spaceRe = re.compile('\s+')
-
-def texiEscape(text):
- return spaceRe.sub(text, ' ')
-
-entities = latex.entities.copy()
-entities['copy'] = '@copyright{}'
-
-class TexiSpitter(latex.BaseLatexSpitter):
-
- baseLevel = 1
-
- def writeNodeData(self, node):
- buf = StringIO()
- latex.getLatexText(node, self.writer, texiEscape, entities)
-
- def visitNode_title(self, node):
- self.writer('@node ')
- self.visitNodeDefault(node)
- self.writer('\n')
- self.writer('@section ')
- self.visitNodeDefault(node)
- self.writer('\n')
- headers = tree.getHeaders(domhelpers.getParents(node)[-1])
- if not headers:
- return
- self.writer('@menu\n')
- for header in headers:
- self.writer('* %s::\n' % domhelpers.getNodeText(header))
- self.writer('@end menu\n')
-
- def visitNode_pre(self, node):
- self.writer('@verbatim\n')
- buf = StringIO()
- latex.getLatexText(node, buf.write, entities=entities)
- self.writer(text.removeLeadingTrailingBlanks(buf.getvalue()))
- self.writer('@end verbatim\n')
-
- def visitNode_code(self, node):
- fout = StringIO()
- latex.getLatexText(node, fout.write, texiEscape, entities)
- self.writer('@code{'+fout.getvalue()+'}')
-
- def visitNodeHeader(self, node):
- self.writer('\n\n@node ')
- self.visitNodeDefault(node)
- self.writer('\n')
- level = (int(node.tagName[1])-2)+self.baseLevel
- self.writer('\n\n@'+level*'sub'+'section ')
- self.visitNodeDefault(node)
- self.writer('\n')
-
- def visitNode_a_listing(self, node):
- fileName = os.path.join(self.currDir, node.getAttribute('href'))
- self.writer('@verbatim\n')
- self.writer(open(fileName).read())
- self.writer('@end verbatim')
- # Write a caption for this source listing
-
- def visitNode_a_href(self, node):
- self.visitNodeDefault(node)
-
- def visitNode_a_name(self, node):
- self.visitNodeDefault(node)
-
- visitNode_h2 = visitNode_h3 = visitNode_h4 = visitNodeHeader
-
- start_dl = '@itemize\n'
- end_dl = '@end itemize\n'
- start_ul = '@itemize\n'
- end_ul = '@end itemize\n'
-
- start_ol = '@enumerate\n'
- end_ol = '@end enumerate\n'
-
- start_li = '@item\n'
- end_li = '\n'
-
- start_dt = '@item\n'
- end_dt = ': '
- end_dd = '\n'
-
- start_p = '\n\n'
-
- start_strong = start_em = '@emph{'
- end_strong = end_em = '}'
-
- start_q = "``"
- end_q = "''"
-
- start_span_footnote = '@footnote{'
- end_span_footnote = '}'
-
- start_div_note = '@quotation\n@strong{Note:}'
- end_div_note = '@end quotation\n'
-
- start_th = '@strong{'
- end_th = '}'
« no previous file with comments | « third_party/twisted_8_1/twisted/lore/test/test_man2lore.py ('k') | third_party/twisted_8_1/twisted/lore/topfiles/NEWS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698