]> git.donarmstrong.com Git - lilypond.git/blobdiff - buildscripts/lys-to-tely.py
Rearrange and reminders.
[lilypond.git] / buildscripts / lys-to-tely.py
index c0a66457a95b5d33bf8dfa46b0a36b61ad10c3cb..9150acfe393296ab87ba34e95cdf3cce9e2712ba 100644 (file)
@@ -6,6 +6,7 @@ TODO:
 
  * Add @nodes, plit at sections?
  * Less kludged first introduction file
+ * include *.texi files for text at start of section?
 
 '''
 
@@ -23,21 +24,17 @@ Construct tely doc from LY-FILEs.
 
 Options:
  -h, --help                print this help
- -n, --name=NAME         write tely doc to NAME
+ -o, --output=NAME         write tely doc to NAME
  -t, --title=TITLE         set tely doc title TITLE
- -i, --introduction=FILE   use FILE as intruduction at the top
- -f, --footer=FILE         use FILE as footer on the bottom of the page
 
 """)
     sys.exit (0)
 
-(options, files) = getopt.getopt(sys.argv[1:], 'hn:t:i:f:', [
-    'help', 'name=', 'title=', 'introduction=', 'footer='])
+(options, files) = getopt.getopt(sys.argv[1:], 'hn:t:', [
+    'help', 'name=', 'title='])
 
 name="ly-doc"
 title="Ly Doc"
-header = None
-footer = None
 for opt in options:
     o = opt[0]
     a = opt[1]
@@ -47,10 +44,6 @@ for opt in options:
         name = a
     elif o == '-t' or o == '--title':
         title = a
-    elif o == '-i' or o == '--introduction':
-        header = a
-    elif o == '-f' or o == '--footer':
-        footer = a
     else:
         raise 'unknown opt ', o
 
@@ -86,11 +79,6 @@ if files:
 @node Top, , , (dir)
 ''' % (name, title, title)
 
-    if header:
-        header_text = open (header).read ()
-        s += header_text
-
-
     def name2line (n):
         # UGR
         s = r"""
@@ -105,12 +93,7 @@ if files:
         return s
     files.sort ()
     s = s + string.join (map (lambda x: name2line (x), files), "\n")
-    s += '\n'
-    if footer:
-        footer_text = open (footer).read ()
-        s += footer_text
-        s += '\n'
-    s = s + '@bye\n'
+    s = s + '\n@bye\n'
     f = "%s/%s.tely" % (dir, name)
     sys.stderr.write ("%s: writing %s..." % (program_name, f))
     h = open (f, "w")