summaryrefslogtreecommitdiffstats
path: root/ppapi/c/documentation
diff options
context:
space:
mode:
authormball@google.com <mball@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 16:36:39 +0000
committermball@google.com <mball@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 16:36:39 +0000
commit0bc3a1bbc2ea981339404cfa5f03dd5ddc75e47e (patch)
treefdfed8b250e75055503a106f226303eddb4e3eb3 /ppapi/c/documentation
parent37b80f39d70449428d51db3c6dda2e40c3877400 (diff)
downloadchromium_src-0bc3a1bbc2ea981339404cfa5f03dd5ddc75e47e.zip
chromium_src-0bc3a1bbc2ea981339404cfa5f03dd5ddc75e47e.tar.gz
chromium_src-0bc3a1bbc2ea981339404cfa5f03dd5ddc75e47e.tar.bz2
Modified html2ezt.py to not rename the html files
The new documentation is not using ezt anymore, so the filenames should not have an ezt suffix. BUG=None TEST=None Review URL: http://codereview.chromium.org/8821022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113216 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/documentation')
-rwxr-xr-xppapi/c/documentation/doxy_cleanup.py (renamed from ppapi/c/documentation/html2ezt.py)26
1 files changed, 9 insertions, 17 deletions
diff --git a/ppapi/c/documentation/html2ezt.py b/ppapi/c/documentation/doxy_cleanup.py
index bb7ca25..4e5bba4 100755
--- a/ppapi/c/documentation/html2ezt.py
+++ b/ppapi/c/documentation/doxy_cleanup.py
@@ -4,11 +4,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-'''This utility converts the html files as emitted by doxygen into ezt files
-that are suitable for inclusion into Google code site.
-
-EZT stands for "EaZy Templating (for Python)". For more information, see
-http://code.google.com/p/ezt/
+'''This utility cleans up the html files as emitted by doxygen so
+that they are suitable for publication on a Google documentation site.
'''
import optparse
@@ -27,16 +24,15 @@ except (ImportError, NotImplementedError):
raise
-class EZTFixer(object):
- '''This class converts the html strings as produced by Doxygen into ezt
- strings as used by the Google code site tools
+class HTMLFixer(object):
+ '''This class cleans up the html strings as produced by Doxygen
'''
def __init__(self, html):
self.soup = BeautifulSoup(html)
def FixTableHeadings(self):
- '''Fixes the doxygen table headings to EZT's liking.
+ '''Fixes the doxygen table headings.
This includes using <th> instead of <h2> for the heading, and putting
the "name" attribute into the "id" attribute of the <tr> tag.
@@ -91,12 +87,9 @@ class EZTFixer(object):
def main():
- '''Main entry for the html2ezt utility
+ '''Main entry for the doxy_cleanup utility
- html2ezt takes a list of html files and creates a set of ezt files with
- the same basename and in the same directory as the original html files.
- Each new ezt file contains a file that is suitable for presentation
- on Google Codesite using the EZT tool.'''
+ doxy_cleanup takes a list of html files and modifies them in place.'''
parser = optparse.OptionParser(usage='Usage: %prog [options] files...')
@@ -114,10 +107,9 @@ def main():
with open(filename, 'r') as file:
html = file.read()
- fixer = EZTFixer(html)
+ fixer = HTMLFixer(html)
fixer.FixAll()
- new_name = re.sub(re.compile('\.html$'), '.ezt', filename)
- with open(new_name, 'w') as file:
+ with open(filename, 'w') as file:
file.write(str(fixer))
if options.move:
new_directory = os.path.join(