/[navidoc]/navidoc/navidoc/directives/pegboard.py
ViewVC logotype

Diff of /navidoc/navidoc/directives/pegboard.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by humppake, Thu Apr 10 09:20:43 2003 UTC revision 1.16 by humppake, Thu Apr 24 07:48:04 2003 UTC
# Line 139  def build_pegtable(): Line 139  def build_pegtable():
139          config.mp_generate = 0          config.mp_generate = 0
140          for rstfile in rstfiles:          for rstfile in rstfiles:
141              config.input_filename = rstfile              config.input_filename = rstfile
142              config.output_filename = ''              config.output_filename = rstfile[0:len(rstfile)-4]+'.gen.html'
143              pub = Publisher()              pub = Publisher()
144              pub.set_reader('standalone', None, 'restructuredtext')              pub.set_reader('standalone', None, 'restructuredtext')
145              filename = slashify(config.working_directory)+rstfile              filename = slashify(config.working_directory)+rstfile
# Line 149  def build_pegtable(): Line 149  def build_pegtable():
149              try:              try:
150                  pub.set_io()                  pub.set_io()
151                  document = pub.reader.read(pub.source, pub.parser, pub.settings)                  document = pub.reader.read(pub.source, pub.parser, pub.settings)
                 config.output_filename = rstfile[0:len(rstfile)-4]+'.gen.html'  
152                  pub.apply_transforms(document)                  pub.apply_transforms(document)
153                  peg['ignore'].append(config.output_filename)                  peg['ignore'].append(config.output_filename)
                 config.output_filename = ''  
154    
155                  #conversion have succeeded so far, parsing peg's metadata                  #conversion have succeeded so far, parsing peg's metadata
156                  #from its document tree                  #from its document tree
# Line 178  def build_pegtable(): Line 176  def build_pegtable():
176              except:              except:
177                  dbg_fail('PEG %s: Docutil raised an exception while converting %s. ' % (pegdir, rstfile))                  dbg_fail('PEG %s: Docutil raised an exception while converting %s. ' % (pegdir, rstfile))
178                  dbg_fail('Conversion failed and HTML not created.\n')                  dbg_fail('Conversion failed and HTML not created.\n')
179    
180          config.dbg.enable('docutils')          config.dbg.enable('docutils')
181          config.mp_generate = 1          config.mp_generate = 1
182    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26