+++ /dev/null
-\version "2.10.0"
-%% +.ly: Be the first .ly file for lys-to-tely.py.
-%% Better to make lys-to-tely.py include "introduction.texi" or
-%% other .texi documents too?
-
-\header{
-texidoc = #(string-append "
-@section Introduction
-
-This document shows all kinds of advanced snippets from the
-LilyPond Snippet Repository.
-
-In the web version of this document, you can click on the file name
-or figure for each example to see the corresponding input file.
-
-This document is for LilyPond version
-" (lilypond-version) ".")
-}
-
-% make sure .png is generated.
-\lyrics { "(left blank intentionally)" }
--- /dev/null
+\version "2.10.0"
+%% +.ly: Be the first .ly file for lys-to-tely.py.
+%% Better to make lys-to-tely.py include "introduction.texi" or
+%% other .texi documents too?
+
+\header{
+texidoc = #(string-append "
+@section Introduction
+
+This document shows all kinds of advanced snippets from the
+LilyPond Snippet Repository.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+
+This document is for LilyPond version
+" (lilypond-version) ".")
+}
+
+% make sure .png is generated.
+\lyrics { "(left blank intentionally)" }
+++ /dev/null
-\version "2.10.0"
-%% +.ly: Be the first .ly file for lys-to-tely.py.
-%% Better to make lys-to-tely.py include "introduction.texi" or
-%% other .texi documents too?
-
-\header{
-texidoc = #(string-append "
-@section Introduction
-
-This document shows all kinds of `tricks and tips' snippets from the
-LilyPond Snippet Repository.
-
-In the web version of this document, you can click on the file name
-or figure for each example to see the corresponding input file.
-
-This document is for LilyPond version
-" (lilypond-version) ".")
-}
-
-% make sure .png is generated.
-\lyrics { "(left blank intentionally)" }
--- /dev/null
+\version "2.10.0"
+%% +.ly: Be the first .ly file for lys-to-tely.py.
+%% Better to make lys-to-tely.py include "introduction.texi" or
+%% other .texi documents too?
+
+\header{
+texidoc = #(string-append "
+@section Introduction
+
+This document shows all kinds of `tricks and tips' snippets from the
+LilyPond Snippet Repository.
+
+In the web version of this document, you can click on the file name
+or figure for each example to see the corresponding input file.
+
+This document is for LilyPond version
+" (lilypond-version) ".")
+}
+
+% make sure .png is generated.
+\lyrics { "(left blank intentionally)" }
import os.path
import shutil
-dirs=['advanced','trick']
+dirs = ['advanced','trick']
try:
- in_dir=sys.argv[1]
+ in_dir = sys.argv[1]
except:
print "Please specify input_file."
exit
for dir in dirs:
- srcdir = os.path.join(in_dir, dir)
- destdir = os.path.join(os.getcwd(), 'lsr', dir)
+ srcdir = os.path.join (in_dir, dir)
+ destdir = os.path.join (os.getcwd(), 'lsr', dir)
- file_names=os.listdir(destdir)
+ file_names = os.listdir (destdir)
for file in file_names:
- if (file[-3:]=='.ly'):
- if not(file=='+.ly'):
+ if (file.endswith ('.ly')):
+ if (file[:3] != 'AAA'): # or whatever we use to denote the first file
os.remove( os.path.join(destdir,file) )
- file_names=os.listdir(in_dir + dir)
+ file_names = os.listdir (in_dir + dir)
for file in file_names:
- out_name=file
- src = os.path.join(srcdir, file)
- dest = os.path.join(destdir, out_name)
- shutil.copyfile(src, dest)
+ src = os.path.join (srcdir, file)
+ dest = os.path.join (destdir, file)
+ shutil.copyfile (src, dest)