commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue common/utils/create-technote-index.py apps...


From: Jason Cater
Subject: gnue common/utils/create-technote-index.py apps...
Date: Thu, 08 Aug 2002 10:47:55 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/08/08 10:47:55

Modified files:
        common/utils   : create-technote-index.py 
Added files:
        appserver/doc/technotes: index.html 
        common/doc/technotes: index.html 
        designer/doc/technotes: index.html 
        forms/doc/technotes: index.html 
        navigator/doc/technotes: index.html 
        reports/doc/technotes: index.html 

Log message:
        merged psu's index.html code into our create-technote-index.py script 
so both an index.html and index.txt are created

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/doc/technotes/index.html?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/doc/technotes/index.html?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/utils/create-technote-index.py.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/doc/technotes/index.html?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/forms/doc/technotes/index.html?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/navigator/doc/technotes/index.html?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/reports/doc/technotes/index.html?rev=1.1

Patches:
Index: gnue/common/utils/create-technote-index.py
diff -c gnue/common/utils/create-technote-index.py:1.2 
gnue/common/utils/create-technote-index.py:1.3
*** gnue/common/utils/create-technote-index.py:1.2      Thu Jul 18 14:29:03 2002
--- gnue/common/utils/create-technote-index.py  Thu Aug  8 10:47:54 2002
***************
*** 29,36 ****
      product = ""
  
  
!   index = open("index.txt","w")
!   index.write (fileHeader % product)
  
    current = {}
    deprecated = {}
--- 29,39 ----
      product = ""
  
  
!   text = open("index.txt","w")
!   text.write (textHeader % product)
! 
!   html = open("index.html","w")
!   html.write (htmlHeader % product)
  
    current = {}
    deprecated = {}
***************
*** 45,68 ****
                         ('Deprecated',deprecated),
                         ('Obsolete',obsolete)):
      if len(s.keys()):
!       index.write (sectionHeader % section)
        files = s.keys()
        files.sort()
        for file in files:
!         index.write ("%s   %s\n" % (file, s[file]))
  
!       index.write (sectionFooter)
  
!   index.write(fileFooter)
  
  
  
  
! fileHeader = """
  %sTech Notes Index
  """
  
! fileFooter = """
  
  
  --------
--- 48,83 ----
                         ('Deprecated',deprecated),
                         ('Obsolete',obsolete)):
      if len(s.keys()):
!       text.write (textSectionHeader % section)
!       html.write (htmlSectionHeader % section)
        files = s.keys()
        files.sort()
        for file in files:
!         text.write ("%s   %s\n" % (file, s[file]))
!         html.write ("<tr><td><a href=\"%s\">%s</a></td><td>%s</td></tr>\n" % 
(file, file, s[file]))
! 
!       text.write (textSectionFooter)
!       html.write (htmlSectionFooter)
  
!   text.write(textFooter)
!   html.write(htmlFooter)
  
!   text.close()
!   html.close()
  
  
+ 
################################################################################
+ #
+ # Text index headers/footers
+ #
+ 
################################################################################
  
  
! textHeader = """
  %sTech Notes Index
  """
  
! textFooter = """
  
  
  --------
***************
*** 71,77 ****
  """
  
  
! sectionHeader = """
  
  ==============================================================================
  %s Tech Notes
--- 86,92 ----
  """
  
  
! textSectionHeader = """
  
  ==============================================================================
  %s Tech Notes
***************
*** 81,89 ****
  ----------  ------------------------------------------------------------------
  """
  
! sectionFooter = """\
  ----------  ------------------------------------------------------------------
  """
  
  if __name__ == '__main__':
!   run()
\ No newline at end of file
--- 96,147 ----
  ----------  ------------------------------------------------------------------
  """
  
! textSectionFooter = """\
  ----------  ------------------------------------------------------------------
  """
  
+ 
+ 
################################################################################
+ #
+ # HTML index headers/footers
+ #
+ 
################################################################################
+ 
+ htmlHeader = """
+ <html>
+ <title>
+ Tech Notes Index
+ </title>
+ <body>
+ <h1>%sTech Notes Index</h1>
+ """
+ 
+ htmlFooter = """
+ 
+ 
+ <hr>
+ <p>This file automatically created by
+ common/utils/create-technote-index.py</p>
+ </body>
+ </html>
+ """
+ 
+ 
+ htmlSectionHeader = """
+ 
+ <h3>%s Tech Notes</h3>
+ 
+ <table border="1" width="100%%">
+ <tr><th>File</th><th>Title</th></tr>
+ 
+ """
+ 
+ htmlSectionFooter = """\
+ </table>
+ 
+ """
+ 
+ 
  if __name__ == '__main__':
!   run()
! 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]