From aae91f7e94146d56727471074c4d2795d666521f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 13 Nov 2002 01:11:53 +0000 Subject: [PATCH] (edit): -e option: inline editing. --- ChangeLog | 9 ++++++++ buildscripts/new-chords.py | 22 +++++++++++++++++- input/regression/abe.ly | 1 + input/regression/accidental-cautionary.ly | 1 + input/regression/accidental-double.ly | 1 + input/regression/accidental-ledger.ly | 1 + input/regression/accidental-octave.ly | 1 + input/regression/accidental-placement.ly | 23 ++++++++++--------- input/regression/accidental-single-double.ly | 1 + .../accidental-unbroken-tie-spacing.ly | 5 ++-- input/regression/accidental-voice.ly | 1 + input/regression/accidental.ly | 1 + input/regression/accidentals.ly | 1 + input/regression/arpeggio-collision.ly | 8 ++++--- input/regression/arpeggio.ly | 12 +++++----- input/regression/auto-beam-bar.ly | 1 + input/regression/auto-beam-triplet.ly | 1 + input/regression/auto-beam-tuplets.ly | 1 + input/regression/auto-change.ly | 1 + 19 files changed, 69 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0339516c6..8aa4b64b3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2002-11-13 Han-Wen Nienhuys + + * buildscripts/new-chords.py (edit): -e option: inline editing. + + * input/regression/a*.ly (texidoc): syntax updates. + + * Documentation/user/lilypond-book.itely (Integrating La@TeX{} and + music): elucidations. + 2002-11-11 Juergen Reuter * lily/include/lily-proto.hh, ly/engraver-init.ly, diff --git a/buildscripts/new-chords.py b/buildscripts/new-chords.py index a2aa3c0768..eb9656a8d1 100644 --- a/buildscripts/new-chords.py +++ b/buildscripts/new-chords.py @@ -3,6 +3,9 @@ import re import string import sys +import getopt +import os + def sub_chord (m): str = m.group(1) @@ -129,5 +132,22 @@ def sub_chords (str): str= re.sub (r'@ACCENT@', '>', str) return str +(opts, files)= getopt.getopt( sys.argv[1:], 'e',['edit']) +edit = 0 +for (o,a) in opts: + if o == '-e' or o == '--edit': + edit = 1 -print sub_chords (open (sys.argv[1]).read()) + marker_str +for a in files: + str = open (a).read() + if re.search (str, marker_str): + continue + + str = sub_chords (str) + marker_str + + if edit: + open (a + '.NEW', 'w').write (str) + os.rename (a, a + '~') + os.rename (a + '.NEW', a) + else: + print str diff --git a/input/regression/abe.ly b/input/regression/abe.ly index 30bb881b98..dbd888c1e4 100644 --- a/input/regression/abe.ly +++ b/input/regression/abe.ly @@ -19,3 +19,4 @@ texidoc="Automatic beamer behaves nicely." } } } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental-cautionary.ly b/input/regression/accidental-cautionary.ly index 55896b3cff..23b3687d8b 100644 --- a/input/regression/accidental-cautionary.ly +++ b/input/regression/accidental-cautionary.ly @@ -15,3 +15,4 @@ smaller accidentals (default) or parentheses. \property Staff.Accidental \override #'style = #'parentheses cis''?4 }} +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental-double.ly b/input/regression/accidental-double.ly index 4451276f91..e096c1e56d 100644 --- a/input/regression/accidental-double.ly +++ b/input/regression/accidental-double.ly @@ -14,3 +14,4 @@ } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental-ledger.ly b/input/regression/accidental-ledger.ly index d55a9ca93b..9c7dc6faf9 100644 --- a/input/regression/accidental-ledger.ly +++ b/input/regression/accidental-ledger.ly @@ -10,3 +10,4 @@ } \paper { linewidth = -1. } } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental-octave.ly b/input/regression/accidental-octave.ly index 3ed18f9309..041442e2b7 100644 --- a/input/regression/accidental-octave.ly +++ b/input/regression/accidental-octave.ly @@ -81,3 +81,4 @@ mus = \notes { indent=0.0 } } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental-placement.ly b/input/regression/accidental-placement.ly index 80f8b6e003..19919746b9 100644 --- a/input/regression/accidental-placement.ly +++ b/input/regression/accidental-placement.ly @@ -11,18 +11,19 @@ flats in a sixth shoudl be staggered. " cis4 c4 \transpose c c' { - - - - - + <>4 + <> + <> + <> + <> } - - - - - - + <>4 + <> + <> + <> + <> + <> } \paper { linewidth = -1. } } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental-single-double.ly b/input/regression/accidental-single-double.ly index 4ce483a997..afb8da3b89 100644 --- a/input/regression/accidental-single-double.ly +++ b/input/regression/accidental-single-double.ly @@ -28,3 +28,4 @@ gis ges gis g | } > } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental-unbroken-tie-spacing.ly b/input/regression/accidental-unbroken-tie-spacing.ly index e4361d1f1e..609582595a 100644 --- a/input/regression/accidental-unbroken-tie-spacing.ly +++ b/input/regression/accidental-unbroken-tie-spacing.ly @@ -10,8 +10,8 @@ rechts = \notes \relative c' { \clef treble \time 3/4 \context Voice { - c8 h2 ~ | - + c8 h2 <>8 ~ | + <>8 } } @@ -26,3 +26,4 @@ Rechts = \context Staff \notes { linewidth = -3.3 \cm } } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental-voice.ly b/input/regression/accidental-voice.ly index 521fc43558..315207e998 100644 --- a/input/regression/accidental-voice.ly +++ b/input/regression/accidental-voice.ly @@ -58,3 +58,4 @@ voiceb = \notes \transpose c c' { \context NoteNames=namesb \apply #no-octaves \voiceb > } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidental.ly b/input/regression/accidental.ly index 4d48f7b307..94d9f3784e 100644 --- a/input/regression/accidental.ly +++ b/input/regression/accidental.ly @@ -14,3 +14,4 @@ foo = \notes\relative c'' { \key as \major dis4 dis dis!^"force" dis? } \context NoteNames \foo > } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/accidentals.ly b/input/regression/accidentals.ly index 6369ad13b0..0920b82908 100644 --- a/input/regression/accidentals.ly +++ b/input/regression/accidentals.ly @@ -69,3 +69,4 @@ mel = \notes { \key d \major \time 4/4 } } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/arpeggio-collision.ly b/input/regression/arpeggio-collision.ly index ecf776a67e..851621aa0e 100644 --- a/input/regression/arpeggio-collision.ly +++ b/input/regression/arpeggio-collision.ly @@ -34,9 +34,9 @@ hairyChord = \context Staff \notes\relative c' < \score{ \notes \transpose c c' { - \context Voice < fis''-\arpeggio g d a > - \context Voice < fis,-\arpeggio g d a > - \context Voice < fis''-\arpeggio g d a > + << fis'' g d a >>-\arpeggio + << fis, g d a >>-\arpeggio + << fis'' g d a >>-\arpeggio \hairyChord } \paper { @@ -47,3 +47,5 @@ hairyChord = \context Staff \notes\relative c' < } } } + +%% new-chords-done %% diff --git a/input/regression/arpeggio.ly b/input/regression/arpeggio.ly index 507e23c2e6..5be9da372c 100644 --- a/input/regression/arpeggio.ly +++ b/input/regression/arpeggio.ly @@ -10,19 +10,19 @@ Arpeggios are supported, both cross-staff and broken single staff. \score{ \context PianoStaff < \context Staff=one \notes\relative c''{ - \context Voice < fis,-\arpeggio d a > + \context Voice << fis, d a >>-\arpeggio \property Staff.Arpeggio \override #'arpeggio-direction = #1 - \context Voice < fis,-\arpeggio d a > + \context Voice << fis, d a >>-\arpeggio %%\property PianoStaff.SpanArpeggio \override #'connect = ##t \property PianoStaff.connectArpeggios = ##t - + <>-\arpeggio } \context Staff=two \notes\relative c{ \clef bass - \context Voice < g b d-\arpeggio > + \context Voice << g b d >>-\arpeggio \property Staff.Arpeggio \override #'arpeggio-direction = #-1 - \context Voice < g b d-\arpeggio > - + \context Voice << g b d >>-\arpeggio + <>-\arpeggio } > } diff --git a/input/regression/auto-beam-bar.ly b/input/regression/auto-beam-bar.ly index 57b932873c..9f51a0299a 100644 --- a/input/regression/auto-beam-bar.ly +++ b/input/regression/auto-beam-bar.ly @@ -20,3 +20,4 @@ a16 g a bes c d % ees8 d c linewidth=-1. } } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/auto-beam-triplet.ly b/input/regression/auto-beam-triplet.ly index cdc88b9335..6e500421a3 100644 --- a/input/regression/auto-beam-triplet.ly +++ b/input/regression/auto-beam-triplet.ly @@ -12,3 +12,4 @@ texidoc = "Automatic beaming is also done on tuplets." } \paper{ } } +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/auto-beam-tuplets.ly b/input/regression/auto-beam-tuplets.ly index ffc037e1e3..c42ae1ad04 100644 --- a/input/regression/auto-beam-tuplets.ly +++ b/input/regression/auto-beam-tuplets.ly @@ -12,3 +12,4 @@ beams even if they're auto generated." [f8 f f ][f8 f f ] f f f f f f } }} +%% new-chords-done %% \ No newline at end of file diff --git a/input/regression/auto-change.ly b/input/regression/auto-change.ly index 98ee678409..dc1346bc31 100644 --- a/input/regression/auto-change.ly +++ b/input/regression/auto-change.ly @@ -22,3 +22,4 @@ note. When central C is reached, we don't switch (by default). > } +%% new-chords-done %% \ No newline at end of file -- 2.39.5