diff options
author | konablend <[email protected]> | 2009-03-03 02:49:54 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-03-03 02:49:54 +0000 |
commit | 55afb374694267dd7209afd2ec279e8f51154bcf (patch) | |
tree | 8d56c354b0998d39fc0c992b1abd24753a4c46eb /doc/xml2wiki.py | |
parent | 0a6c39fcd2f352d0413298274efab13056fd429a (diff) |
BuildSystem:
- fixed OSX + Xcode to support parallel builds
- enhanced OSX + Xcode to use proper pass-thru for all make targets
- added global target --> install
- added install: test.install
- added install: gtk.install
- updated pre-generated building guides (these will go away when wiki is updated)
- updated xml2wiki script to spit out heading
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2205 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'doc/xml2wiki.py')
-rwxr-xr-x | doc/xml2wiki.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/doc/xml2wiki.py b/doc/xml2wiki.py index 96651c20f..2b7eb4827 100755 --- a/doc/xml2wiki.py +++ b/doc/xml2wiki.py @@ -16,7 +16,7 @@ class StreamEntry: def __init__( self, object, isElement ): self.object = object self.isElement = isElement - + ############################################################################### class Element: @@ -64,10 +64,7 @@ class Document( Element ): self._chapterLevel = 0 self._sectionLevel = 0 self._dividerCount = 0 - - #self._pragmaSummary = PragmaElement( self, 'summary' ) - #self._pragmaLabels = PragmaElement( self, 'labels' ) - #self._pragmaLabels._addText( 'xml2wiki,Distribution,Featured' ) + self._majorHeading = Element( self, delimBegin='= ', delimEnd=' =\n\n' ) def _pop( self ): self._stack.pop() @@ -94,13 +91,8 @@ class Document( Element ): self._sectionLevel = self._sectionLevel - 1 def _write( self, file ): - #self._pragmaSummary.write( file ) - #file.write( '\n' ) - #self._pragmaLabels.write( file ) if options.date: file.write( "\n\n ===== `[`generated by xml2wiki on %s`]` =====" % (time.strftime( '%c' ) )) - #if options.toc: - # file.write( '\n\n<wiki:toc max_depth="3" />' ) Element._write( self, file ) file.write( '\n' ) @@ -135,9 +127,9 @@ class Document( Element ): e = ItemizeElement( self._pending ) elif name == 'item': e = ItemElement( self._pending ) - #elif name == 'majorheading': - # e = self._pragmaSummary - # shouldAdd = False + elif name == 'majorheading': + e = self._majorHeading + shouldAdd = False elif name == 'para': e = ParagraphElement( self._pending ) elif name == 'quotation': @@ -388,8 +380,8 @@ with open( args[0], 'rb' ) as fin: writer = IndentedWriter( 4, sys.stdout ) +doc._majorHeading.write( writer ) if options.toc: for e in toc: writer.write( '%s* [#%s %s]\n' % (' ' * e._level,e._anchor,e._stream[0].object) ) - doc.write( writer ) |