/[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.8 by humppake, Mon Mar 24 08:08:13 2003 UTC revision 1.9 by humppake, Wed Mar 26 15:36:17 2003 UTC
# Line 19  Line 19 
19  # MA  02111-1307  USA  # MA  02111-1307  USA
20  #  #
21    
22    # $Id$
23    
24  #  #
25  # Written by Benja Fallensten, Vesa Kaihlavirta, Asko Soukka  # Written by Benja Fallensten, Vesa Kaihlavirta, Asko Soukka
26  #  #
# Line 136  def build_pegtable(): Line 138  def build_pegtable():
138          rstfiles = [f for f in peg['files'] if f.endswith('.rst')]          rstfiles = [f for f in peg['files'] if f.endswith('.rst')]
139    
140          for rstfile in rstfiles:          for rstfile in rstfiles:
141                config.input_filename = rstfile
142                config.output_filename = ''
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 145  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)
152                    config.output_filename = rstfile[0:len(rstfile)-4]+'.gen.html'
153                  pub.apply_transforms(document)                  pub.apply_transforms(document)
154                  peg['ignore'].append(rstfile[0:len(rstfile)-4]+'.gen.html')                  peg['ignore'].append(config.output_filename)
155                    config.output_filename = ''
156    
157                  #conversion have succeeded so far, parsing peg's metadata                  #conversion have succeeded so far, parsing peg's metadata
158                  #from its document tree                  #from its document tree
# Line 181  def build_pegtable(): Line 187  def build_pegtable():
187                  elif file[len(file)-4:len(file)] in ('.rst', '.txt'):                  elif file[len(file)-4:len(file)] in ('.rst', '.txt'):
188                      peg['html'] = file                      peg['html'] = file
189                      break                      break
190                    config.intput_filename = ''
191    
192          #finally adds peg's metadata into pegtable          #finally adds peg's metadata into pegtable
193          pegtable.append(peg)          pegtable.append(peg)
194    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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