Browse Source

Use a more elegant syntax to select diagrampages

pull/266/head
Olivier Radisson 4 years ago
parent
commit
890abc59db
  1. 10
      patacrep/data/templates/songbook_model.yml
  2. 6
      patacrep/templates.py

10
patacrep/data/templates/songbook_model.yml

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

6
patacrep/templates.py

@ -325,5 +325,7 @@ def iter_bookoptions(config):
elif config['chords']['diagrampage'] == "all":
yield 'diagrampage'
for instrument in config['chords']['instrument'].split("+"):
yield instrument
if isinstance(config['chords']['instrument'], str):
yield config['chords']['instrument']
else:
yield from config['chords']['instrument']

Loading…
Cancel
Save