Browse Source

Add a way to display both guitar and ukulele diagrams

pull/266/head
Olivier Radisson 4 years ago
parent
commit
c1ff74b856
  1. 2
      patacrep/data/templates/songbook_model.yml
  2. 3
      patacrep/data/templates/styles/chords.sty
  3. 3
      patacrep/templates.py

2
patacrep/data/templates/songbook_model.yml

@ -55,6 +55,8 @@ schema:
value: "guitar" value: "guitar"
- type: //str - type: //str
value: "ukulele" value: "ukulele"
- type: //str
value: "guitar+ukulele"
notation: notation:
type: //any type: //any
of: of:

3
patacrep/data/templates/styles/chords.sty

@ -242,8 +242,8 @@
\musicnote[french]{Accordage standard : {\nolyrics \[\printnoteE{} \printnoteA{} \printnoteD{} \printnoteG{} \printnoteB{} \printnoteE{}]}} \musicnote[french]{Accordage standard : {\nolyrics \[\printnoteE{} \printnoteA{} \printnoteD{} \printnoteG{} \printnoteB{} \printnoteE{}]}}
\musicnote[english]{Standard tuning: {\nolyrics \[\printnoteE{} \printnoteA{} \printnoteD{} \printnoteG{} \printnoteB{} \printnoteE{}]}} \musicnote[english]{Standard tuning: {\nolyrics \[\printnoteE{} \printnoteA{} \printnoteD{} \printnoteG{} \printnoteB{} \printnoteE{}]}}
\end{verse*} \end{verse*}
\endsong \endsong
\sclearpage
\fi \fi
\ifukulele \ifukulele
@ -398,6 +398,7 @@
\end{verse*} \end{verse*}
\endsong \endsong
\sclearpage
\fi \fi
\end{songs} \end{songs}

3
patacrep/templates.py

@ -325,4 +325,5 @@ def iter_bookoptions(config):
elif config['chords']['diagrampage'] == "all": elif config['chords']['diagrampage'] == "all":
yield 'diagrampage' yield 'diagrampage'
yield config['chords']['instrument'] for instrument in config['chords']['instrument'].split("+"):
yield instrument

Loading…
Cancel
Save