]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/ly2dvi.py
patch::: 1.1.53.jbr1
[lilypond.git] / scripts / ly2dvi.py
index 53e020c5bb60dd2ea95986704566e4b7e38f9505..25da9f8fce53a942c5982d455ceb079546208335 100644 (file)
@@ -14,7 +14,7 @@ Output: DVI file
 """
 
 name = 'ly2dvi'
-version = '0.0.11'
+version = '0.0.12'
 errorlog = ''
 
 import sys
@@ -63,7 +63,7 @@ class Input:
 
         for i in [''] + Props.get('include')[0:]:
             ifile = os.path.join(i,file)
-            for j in ['','.ly','.fly', 'sly']:
+            for j in ['','.ly','.fly', '.sly']:
                 jfile = ifile+j
                 try:
                     this.__fd = open( jfile, 'r' )
@@ -760,9 +760,9 @@ class Properties:
         """
 
         if int(value) == 1:
-            this.__set('pagenumber',1,requester)
+            this.__set('pagenumber','\\pagestyle{empty}',requester)
         else:
-            this.__set('pagenumber',0,requester)
+            this.__set('pagenumber','%',requester)
 
     #
     # setSeparate
@@ -854,7 +854,11 @@ class Properties:
         """
 
         os.environ['LILYPONDPREFIX'] = path
+        if os.name == 'nt' or os.name == 'dos':
+            path = unc2dos(path);
+
        this.__set('root',path,requester)
+        
 
     #
     # printProps
@@ -912,6 +916,17 @@ def getTeXFile(contents):
     else:
         return texfiles
 
+def unc2dos(path):
+    """
+    Convert a path of format //<drive>/this/that/the/other to
+    <drive>:\this\that\the\other
+    """
+    m=re.match('^//([A-Za-z])(/.*)$',path)
+    if m:
+        return m.group(1) + ':' + os.path.normpath(m.group(2))
+    
+    
+
 def program_id ():
     return name + ' ' + version;
 
@@ -990,7 +1005,7 @@ def main():
         elif o == '--landscape' or o == '-L':
            Props.setOrientation('landscape','commandline')
         elif o == '--nonumber' or o == '-N':
-           Props.setNonumber('commandline')
+           Props.setNonumber(1,'commandline')
         elif o == '--Width' or o == '-W':
            Props.setLineWidth(a,'commandline')
         elif o == '--dependencies' or o == '-d':