From: John Mandereau Date: Sat, 5 Jan 2008 00:02:48 +0000 (+0100) Subject: Customize LSR snippets headers X-Git-Tag: release/2.11.38-1~124^2~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=42b9494ebea97ec27c72ad9952e3d87b9ff0c20d;p=lilypond.git Customize LSR snippets headers --- diff --git a/buildscripts/makelsr.py b/buildscripts/makelsr.py index 480da8cc75..61317729cb 100755 --- a/buildscripts/makelsr.py +++ b/buildscripts/makelsr.py @@ -10,7 +10,12 @@ This script must be run from top of the source tree; 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 ''' @@ -20,14 +25,15 @@ NEW_LYS = os.path.join ('input', 'new') 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) @@ -55,7 +61,11 @@ def copy_ly (srcdir, name, tags): 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)