From: Graham Percival Date: Sat, 20 Jan 2007 19:45:25 +0000 (-0800) Subject: Added automatic LSR infrastructure. X-Git-Tag: release/2.11.13-1~13^2~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=53beda01ed73495a40ccb0caab9abd60b2c536cf;p=lilypond.git Added automatic LSR infrastructure. --- diff --git a/input/GNUmakefile b/input/GNUmakefile index 022f9c3f12..a8c4d4a26b 100644 --- a/input/GNUmakefile +++ b/input/GNUmakefile @@ -1,6 +1,6 @@ depth = .. -SUBDIRS = test regression tutorial mutopia manual +SUBDIRS = test regression tutorial mutopia manual lsr examples = typography-demo les-nereides wilhelmus proportional bach-schenker cary diff --git a/input/lsr/GNUmakefile b/input/lsr/GNUmakefile new file mode 100644 index 0000000000..95cd95a40d --- /dev/null +++ b/input/lsr/GNUmakefile @@ -0,0 +1,7 @@ +depth = ../../ + +SUBDIRS = advanced trick + +LOCALSTEPMAKE_TEMPLATES=ly mutopia + +include $(depth)/make/stepmake.make diff --git a/input/lsr/advanced/GNUmakefile b/input/lsr/advanced/GNUmakefile new file mode 100644 index 0000000000..6d37cd2270 --- /dev/null +++ b/input/lsr/advanced/GNUmakefile @@ -0,0 +1,16 @@ + +depth = ../../../ + +STEPMAKE_TEMPLATES=documentation texinfo tex +LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc + +## Hmm, would this work? No -- if we really want examples, move +## to other dir (input/) comes to mind. +## examples = font20 ancient-font +## LOCALSTEPMAKE_TEMPLATES += ly mutopia + +EXTRA_DIST_FILES= README + +include $(depth)/make/stepmake.make + +TITLE=Advanced snippets diff --git a/input/lsr/advanced/SConscript b/input/lsr/advanced/SConscript new file mode 100644 index 0000000000..f72bfffc28 --- /dev/null +++ b/input/lsr/advanced/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env', 'collate') +collate (title = 'Advanced snippets') diff --git a/input/lsr/trick/GNUmakefile b/input/lsr/trick/GNUmakefile new file mode 100644 index 0000000000..8cd520e0e8 --- /dev/null +++ b/input/lsr/trick/GNUmakefile @@ -0,0 +1,16 @@ + +depth = ../../../ + +STEPMAKE_TEMPLATES=documentation texinfo tex +LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc + +## Hmm, would this work? No -- if we really want examples, move +## to other dir (input/) comes to mind. +## examples = font20 ancient-font +## LOCALSTEPMAKE_TEMPLATES += ly mutopia + +EXTRA_DIST_FILES= README + +include $(depth)/make/stepmake.make + +TITLE=Trick snippets diff --git a/input/lsr/trick/SConscript b/input/lsr/trick/SConscript new file mode 100644 index 0000000000..3845b7b8c6 --- /dev/null +++ b/input/lsr/trick/SConscript @@ -0,0 +1,4 @@ +# -*-python-*- + +Import ('env', 'collate') +collate (title = 'Trick snippets') diff --git a/input/makelsr.py b/input/makelsr.py new file mode 100755 index 0000000000..5abbeb967a --- /dev/null +++ b/input/makelsr.py @@ -0,0 +1,39 @@ +#!/usr/bin/python +import sys +import os +import os.path +#import re +import shutil + +dirs=['advanced','trick'] + +try: + 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) +# if ~os.path.isdir(destdir): +# os.mkdir(destdir) + + file_names=os.listdir(destdir) + for file in file_names: + if (file[-3:]=='.ly'): + if not(file=='+.ly'): + os.remove( os.path.join(destdir,file) ) + + file_names=os.listdir(in_dir + dir) + for file in file_names: + out_name=file + #out_name=re.sub(r'_',r'-',os.path.basename(file)) + #out_name=re.sub(r'\(', r'', out_name) + #out_name=re.sub(r'\)', r'', out_name) + #out_name=re.sub(r'\'', r'', out_name) + src = os.path.join(srcdir, file) + dest = os.path.join(destdir, out_name) + #print src + " " + dest + shutil.copyfile(src, dest) +