From 55afb374694267dd7209afd2ec279e8f51154bcf Mon Sep 17 00:00:00 2001 From: konablend Date: Tue, 3 Mar 2009 02:49:54 +0000 Subject: 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 --- doc/xml2wiki.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'doc/xml2wiki.py') 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' ) 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 ) -- cgit v1.2.3