Browse Source

Use full names for cover and language

pull/152/head
Louis 9 years ago
parent
commit
3cab46e897
  1. 2
      examples/songs/chevaliers_de_la_table_ronde.sg
  2. 2
      examples/songs/example-en.sg
  3. 2
      examples/songs/example-fr.sg
  4. 2
      examples/songs/greensleeves.sg
  5. 2
      examples/songs/vent_frais.sg
  6. 2
      patacrep/data/latex/patacrep.sty
  7. 2
      patacrep/songs/chordpro/__init__.py
  8. 6
      patacrep/songs/chordpro/ast.py
  9. 4
      patacrep/songs/chordpro/data/chordpro/song_header
  10. 12
      patacrep/songs/chordpro/data/latex/song
  11. 2
      test/test_chordpro/greensleeves.sgc
  12. 2
      test/test_chordpro/greensleeves.tex
  13. 2
      test/test_chordpro/metadata.sgc
  14. 2
      test/test_chordpro/metadata.tex
  15. 8
      test/test_compilation/datadir.tex.control
  16. 2
      test/test_compilation/datadir_datadir/songs/datadir.sg
  17. 2
      test/test_compilation/datadir_datadir/songs/datadir2.sg
  18. 2
      test/test_compilation/datadir_datadir/songs/relative.sg
  19. 2
      test/test_compilation/datadir_datadir/songs/subdir/subdir.sg

2
examples/songs/chevaliers_de_la_table_ronde.sg

@ -1,7 +1,7 @@
\selectlanguage{french}
\songcolumns{2}
\beginsong{Chevaliers de la table ronde}
[by={Traditionnel},cov={traditionnel},album={France}]
[by={Traditionnel},cover={traditionnel},album={France}]
\cover
\gtab{C}{X32010}

2
examples/songs/example-en.sg

@ -24,7 +24,7 @@
% traditionnel : the file "8-bit-lagerfeuer.jpg" that corresponds to the album art
% 8 bit lagerfeuer : the album whose song is extracted from
\beginsong{Sad robot}
[by={Pornophonique},cov={traditionnel},album={8 bit lagerfeuer}]
[by={Pornophonique},cover={traditionnel},album={8 bit lagerfeuer}]
% inserts the album art (8-bit-lagerfeuer.jpg)
\cover

2
examples/songs/example-fr.sg

@ -26,7 +26,7 @@
% traditionnel : le fichier "8-bit-lagerfeuer.jpg" correspondant à la pochette de l'album
% 8 bit lagerfeuer : le nom de l'album dont la chanson est extraite
\beginsong{Sad robot}
[by={Pornophonique},cov={traditionnel},album={8 bit lagerfeuer}]
[by={Pornophonique},cover={traditionnel},album={8 bit lagerfeuer}]
% insère la pochette de l'album (8-bit-lagerfeuer.jpg)
\cover

2
examples/songs/greensleeves.sg

@ -1,7 +1,7 @@
\selectlanguage{english}
\songcolumns{2}
\beginsong{Greensleeves}
[by={Traditionnel},cov={traditionnel},album={Angleterre}]
[by={Traditionnel},cover={traditionnel},album={Angleterre}]
\cover
\gtab{Am}{X02210}

2
examples/songs/vent_frais.sg

@ -1,7 +1,7 @@
\selectlanguage{french}
\songcolumns{2}
\beginsong{Vent frais}
[by={Traditionnel},cov={traditionnel},album={France}]
[by={Traditionnel},cover={traditionnel},album={France}]
\cover
\gtab{Dm}{XX0231}

2
patacrep/data/latex/patacrep.sty

@ -139,7 +139,7 @@
\setlength{\coverspace}{0.1cm}
\newcommand{\songcover}{}
\newcommand{\songalbum}{}
\newsongkey{cov}{\let\songcover\@empty}{\def\songcover{#1}}
\newsongkey{cover}{\let\songcover\@empty}{\def\songcover{#1}}
\newsongkey{album}{\let\songalbum\@empty}{\def\songalbum{#1}}
\newsongkey{url}{\let\songurl\@empty}{\def\songurl{#1}}
\newsongkey{original}{\let\songoriginal\@empty}{\def\songoriginal{#1}}

2
patacrep/songs/chordpro/__init__.py

@ -26,7 +26,7 @@ class ChordproSong(Song):
song = parse_song(song.read(), self.fullpath)
self.authors = song.authors
self.titles = song.titles
self.lang = song.get_data_argument('lang', self.config['lang'])
self.lang = song.get_data_argument('language', self.config['lang'])
self.data = song.meta
self.cached = {
'song': song,

6
patacrep/songs/chordpro/ast.py

@ -24,7 +24,7 @@ AVAILABLE_DIRECTIVES = [
"guitar_comment",
"image",
"key",
"lang",
"language",
"newline",
"partition",
"subtitle",
@ -51,8 +51,8 @@ DIRECTIVE_SHORTCUTS = {
"by": "artist",
"c": "comment",
"gc": "guitar_comment",
"cover": "cov",
"language": "lang",
"cov": "cover",
"lang": "language",
}
def directive_name(text):

4
patacrep/songs/chordpro/data/chordpro/song_header

@ -21,8 +21,8 @@
{(( key )): (( metadata[key] ))}
(* endif *)
(* endfor *)
(* if 'cov' in metadata -*)
{(( 'cov' )): (( metadata['cov'].argument|search_image ))}
(* if 'cover' in metadata -*)
{(( 'cover' )): (( metadata['cover'].argument|search_image ))}
(* endif *)
(*- for key in metadata.morekeys -*)

12
patacrep/songs/chordpro/data/latex/song

@ -27,11 +27,11 @@
(( key ))={(( metadata[key] ))},
(* endif *)
(* endfor *)
(* if 'cov' in metadata *)
(* block cov *)
(* set cov = metadata["cov"].argument|search_image *)
(* if cov *)
cov={(( cov ))},
(* if 'cover' in metadata *)
(* block cover *)
(* set cover = metadata["cover"].argument|search_image *)
(* if cover *)
cover={(( cover ))},
(* endif *)
(* endblock *)
(* endif *)
@ -40,7 +40,7 @@
(* endfor *)
]
(* if (metadata.cov is defined) *)
(* if (metadata.cover is defined) *)
\cover
(* endif *)

2
test/test_chordpro/greensleeves.sgc

@ -5,7 +5,7 @@
{title: Un sous titre}
{artist: Traditionnel}
{album: Angleterre}
{cov: traditionnel}
{cover: traditionnel}
{partition: greensleeves.ly}

2
test/test_chordpro/greensleeves.tex

@ -7,7 +7,7 @@ Un sous titre}[
by={
Traditionnel },
album={Angleterre},
cov={img/traditionnel},
cover={img/traditionnel},
]
\cover

2
test/test_chordpro/metadata.sgc

@ -10,7 +10,7 @@
{artist: Texte de Jean Richepin, chanté par Georges Brassens}
{album: Album}
{copyright: Copyright}
{cov: metadata_cover}
{cover: metadata_cover}
{key: foo: Foo}
{comment: Comment}

2
test/test_chordpro/metadata.tex

@ -11,7 +11,7 @@ Subtitle5}[
Texte de Jean Richepin, chanté par Georges Brassens },
album={Album},
copyright={Copyright},
cov={img/test/test_chordpro/metadata_cover},
cover={img/test/test_chordpro/metadata_cover},
foo={Foo},
]

8
test/test_compilation/datadir.tex.control

@ -103,7 +103,7 @@ guitar,
Chordpro}[
by={
},
cov={img/datadir.png},
cover={img/datadir.png},
]
\cover
@ -130,7 +130,7 @@ Chordpro}[
Chordpro}[
by={
},
cov={img/datadir2.png},
cover={img/datadir2.png},
]
\cover
@ -157,7 +157,7 @@ Chordpro}[
Chordpro}[
by={
},
cov={@TEST_FOLDER@/datadir_datadir/songs/./relative.png},
cover={@TEST_FOLDER@/datadir_datadir/songs/./relative.png},
]
\cover
@ -184,7 +184,7 @@ Chordpro}[
Chordpro}[
by={
},
cov={@TEST_FOLDER@/datadir_datadir/songs/./subdir/subdir.png},
cover={@TEST_FOLDER@/datadir_datadir/songs/./subdir/subdir.png},
]
\cover

2
test/test_compilation/datadir_datadir/songs/datadir.sg

@ -1,5 +1,5 @@
\beginsong{Image included from datadir\\\LaTeX}
[cov={img/datadir}]
[cover={img/datadir}]
\cover

2
test/test_compilation/datadir_datadir/songs/datadir2.sg

@ -1,5 +1,5 @@
\beginsong{Image included from a different datadir\\\LaTeX}
[cov={img/datadir2}]
[cover={img/datadir2}]
\cover

2
test/test_compilation/datadir_datadir/songs/relative.sg

@ -1,5 +1,5 @@
\beginsong{Image included from song directory\\\LaTeX}
[cov={relative}]
[cover={relative}]
\cover

2
test/test_compilation/datadir_datadir/songs/subdir/subdir.sg

@ -1,5 +1,5 @@
\beginsong{Image included from a nested song directory\\\LaTeX}
[cov={subdir}]
[cover={subdir}]
\cover

Loading…
Cancel
Save