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

Unified Diff: third_party/twisted_8_1/twisted/scripts/htmlizer.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/scripts/htmlizer.py
diff --git a/third_party/twisted_8_1/twisted/scripts/htmlizer.py b/third_party/twisted_8_1/twisted/scripts/htmlizer.py
deleted file mode 100644
index 5bbc1e989db56138b8626bfc74bae148607cf36d..0000000000000000000000000000000000000000
--- a/third_party/twisted_8_1/twisted/scripts/htmlizer.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
-# See LICENSE for details.
-
-#
-
-"""HTML pretty-printing for Python source code."""
-
-__version__ = '$Revision: 1.8 $'[11:-2]
-
-from twisted.python import htmlizer, usage
-from twisted import copyright
-
-import os, sys
-
-header = '''<html><head>
-<title>%(title)s</title>
-<meta name=\"Generator\" content="%(generator)s" />
-%(alternate)s
-%(stylesheet)s
-</head>
-<body>
-'''
-footer = """</body>"""
-
-styleLink = '<link rel="stylesheet" href="%s" type="text/css" />'
-alternateLink = '<link rel="alternate" href="%(source)s" type="text/x-python" />'
-
-class Options(usage.Options):
- synopsis = """%s [options] source.py
- """ % (
- os.path.basename(sys.argv[0]),)
-
- optParameters = [
- ('stylesheet', 's', None, "URL of stylesheet to link to."),
- ]
- zsh_extras = ["1:source python file:_files -g '*.py'"]
-
- def parseArgs(self, filename):
- self['filename'] = filename
-
-def run():
- options = Options()
- try:
- options.parseOptions()
- except usage.UsageError, e:
- print str(e)
- sys.exit(1)
- filename = options['filename']
- if options.get('stylesheet') is not None:
- stylesheet = styleLink % (options['stylesheet'],)
- else:
- stylesheet = ''
-
- output = open(filename + '.html', 'w')
- try:
- output.write(header % {
- 'title': filename,
- 'generator': 'htmlizer/%s' % (copyright.longversion,),
- 'alternate': alternateLink % {'source': filename},
- 'stylesheet': stylesheet
- })
- htmlizer.filter(open(filename), output,
- htmlizer.SmallerHTMLWriter)
- output.write(footer)
- finally:
- output.close()
« no previous file with comments | « third_party/twisted_8_1/twisted/scripts/_twistw.py ('k') | third_party/twisted_8_1/twisted/scripts/manhole.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698