diff --git a/patacrep/songs/chordpro/data/chordpro/song b/patacrep/songs/chordpro/data/chordpro/song index d721df33..3baa8c22 100644 --- a/patacrep/songs/chordpro/data/chordpro/song +++ b/patacrep/songs/chordpro/data/chordpro/song @@ -1,35 +1,3 @@ -(* if language is defined -*) - {language: (( language ))} -(* endif *) -(* if metadata.columns is defined -*) - {columns: (( metadata.columns ))} -(* endif *) -(* if metadata.capo is defined -*) - {capo: (( metadata.capo ))} -(* endif *) +(* include 'song_header' *) -(*- for title in titles -*) - {title: (( title ))} -(* endfor -*) - -(*- for author in authors -*) - {artist: (( author[1] ))(( author[0] ))} -(* endfor *) - -(*- for key in ['album', 'copyright', 'cov', 'tag'] *) - (* if key in metadata -*) - {(( key )): (( metadata[key] ))} - (* endif *) -(* endfor *) - -(*- for key in metadata.keys -*) - {key: (( key.keyword )): (( key.argument ))} -(* endfor *) - -(*- for chord in metadata['define'] *) - ((- render(chord) )) -(* endfor *) - -(* for item in content -*) - (( render(item) )) -(* endfor *) +(* include 'song_body' *) diff --git a/patacrep/songs/chordpro/data/chordpro/song_body b/patacrep/songs/chordpro/data/chordpro/song_body new file mode 100644 index 00000000..1b7159bf --- /dev/null +++ b/patacrep/songs/chordpro/data/chordpro/song_body @@ -0,0 +1,3 @@ +(* for item in content -*) + (( render(item) )) +(* endfor *) diff --git a/patacrep/songs/chordpro/data/chordpro/song_header b/patacrep/songs/chordpro/data/chordpro/song_header new file mode 100644 index 00000000..b4a59862 --- /dev/null +++ b/patacrep/songs/chordpro/data/chordpro/song_header @@ -0,0 +1,31 @@ +(* if language is defined -*) + {language: (( language ))} +(* endif *) +(* if metadata.columns is defined -*) + {columns: (( metadata.columns ))} +(* endif *) +(* if metadata.capo is defined -*) + {capo: (( metadata.capo ))} +(* endif *) + +(*- for title in titles -*) + {title: (( title ))} +(* endfor -*) + +(*- for author in authors -*) + {artist: (( author[1] ))(( author[0] ))} +(* endfor *) + +(*- for key in ['album', 'copyright', 'cov', 'tag'] *) + (* if key in metadata -*) + {(( key )): (( metadata[key] ))} + (* endif *) +(* endfor *) + +(*- for key in metadata.keys -*) + {key: (( key.keyword )): (( key.argument ))} +(* endfor *) + +(*- for chord in metadata['define'] *) + ((- render(chord) )) +(* endfor *)