it updates snippets input/lsr with snippets in input/new or LSR_SNIPPETS_DIR.
'''
-LY_HEADER = '''%%%% Do not edit this file; it is auto-generated from LSR!
+LY_HEADER_LSR = '''%%%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%%%% This file is in the public domain.
+%%%% Tags: %s
+'''
+
+LY_HEADER_NEW = '''%%%% Do not edit this file; it is auto-generated from input/new
%%%% Tags: %s
'''
TAGS = []
# NR 1
TAGS.extend (['pitches', 'rhythms', 'expressive-marks',
-'repeats', 'simultaneous-notes', 'staff-notation', 'editorial-and-educational-use', 'text'])
+'repeats', 'simultaneous-notes', 'staff-notation',
+'editorial-and-educational-use', 'text'])
# NR 2
TAGS.extend (['vocal-music', 'chords', 'piano-music',
'percussion', 'guitar', 'strings', 'bagpipes', 'ancient-notation'])
# other
-TAGS.extend (['contexts-and-engravers', 'tweaks-and-overrides', 'paper-and-layout', 'breaks',
-'spacing', 'midi', 'titles', 'template', 'other'])
+TAGS.extend (['contexts-and-engravers', 'tweaks-and-overrides',
+'paper-and-layout', 'breaks', 'spacing', 'midi', 'titles', 'template', 'other'])
def exit_with_usage (n=0):
sys.stderr.write (USAGE)
global unconverted
dest = os.path.join (DEST, name)
f = open (dest, 'w')
- f.write (LY_HEADER % ', '.join (tags))
+ if in_dir in srcdir:
+ h = LY_HEADER_LSR
+ else:
+ h = LY_HEADER_NEW
+ f.write (h % ', '.join (tags))
f.write (mark_verbatim_section (open (os.path.join (srcdir, name)).read ()))
f.close ()
e = os.system('convert-ly -e ' + dest)