From c1ff74b8564dd30d2dc3d3362c753a8d6d9ce00d Mon Sep 17 00:00:00 2001 From: Olivier Radisson Date: Tue, 13 Oct 2020 02:44:10 +0200 Subject: [PATCH] Add a way to display both guitar and ukulele diagrams --- patacrep/data/templates/songbook_model.yml | 2 ++ patacrep/data/templates/styles/chords.sty | 3 ++- patacrep/templates.py | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/patacrep/data/templates/songbook_model.yml b/patacrep/data/templates/songbook_model.yml index 7ea6028a..bc73ab99 100644 --- a/patacrep/data/templates/songbook_model.yml +++ b/patacrep/data/templates/songbook_model.yml @@ -55,6 +55,8 @@ schema: value: "guitar" - type: //str value: "ukulele" + - type: //str + value: "guitar+ukulele" notation: type: //any of: diff --git a/patacrep/data/templates/styles/chords.sty b/patacrep/data/templates/styles/chords.sty index 05403540..e95433e8 100644 --- a/patacrep/data/templates/styles/chords.sty +++ b/patacrep/data/templates/styles/chords.sty @@ -242,8 +242,8 @@ \musicnote[french]{Accordage standard : {\nolyrics \[\printnoteE{} \printnoteA{} \printnoteD{} \printnoteG{} \printnoteB{} \printnoteE{}]}} \musicnote[english]{Standard tuning: {\nolyrics \[\printnoteE{} \printnoteA{} \printnoteD{} \printnoteG{} \printnoteB{} \printnoteE{}]}} \end{verse*} - \endsong + \sclearpage \fi \ifukulele @@ -398,6 +398,7 @@ \end{verse*} \endsong + \sclearpage \fi \end{songs} diff --git a/patacrep/templates.py b/patacrep/templates.py index 214320eb..d7167920 100644 --- a/patacrep/templates.py +++ b/patacrep/templates.py @@ -325,4 +325,5 @@ def iter_bookoptions(config): elif config['chords']['diagrampage'] == "all": yield 'diagrampage' - yield config['chords']['instrument'] + for instrument in config['chords']['instrument'].split("+"): + yield instrument