Browse Source

Merge pull request #211 from patacrep/datadir_organisation

Datadir organisation
pull/212/head
oliverpool 9 years ago
parent
commit
6de27a84d9
  1. 0
      patacrep/data/templates/songbook/default.tex
  2. 2
      patacrep/data/templates/songbook/layout.tex
  3. 0
      patacrep/data/templates/songbook/patacrep.tex
  4. 0
      patacrep/data/templates/songbook/songs.tex
  5. 0
      patacrep/data/templates/styles/chords.sty
  6. 0
      patacrep/data/templates/styles/crepbook.sty
  7. 0
      patacrep/data/templates/styles/patacrep.sty
  8. 0
      patacrep/data/templates/styles/songs.sty
  9. 0
      patacrep/data/templates/styles/tabs.sty
  10. 2
      patacrep/templates.py
  11. 6
      test/test_songbook/content.tex.control
  12. 8
      test/test_songbook/datadir.tex.control
  13. 4
      test/test_songbook/lang_default.tex.control
  14. 4
      test/test_songbook/lang_en.tex.control
  15. 4
      test/test_songbook/lang_fr.tex.control
  16. 6
      test/test_songbook/languages.tex.control
  17. 4
      test/test_songbook/onthefly/content.onthefly.tex.control
  18. 6
      test/test_songbook/syntax.tex.control
  19. 6
      test/test_songbook/unicode.tex.control

0
patacrep/data/templates/default.tex → patacrep/data/templates/songbook/default.tex

2
patacrep/data/templates/layout.tex → patacrep/data/templates/songbook/layout.tex

@ -28,7 +28,7 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
(* for dir in _datadir|iter_datadirs *) (* for dir in _datadir|iter_datadirs *)
{(( dir | path2posix ))/latex/} % {(( dir | path2posix ))/templates/styles/} %
(* endfor *) (* endfor *)
} }
\makeatother \makeatother

0
patacrep/data/templates/patacrep.tex → patacrep/data/templates/songbook/patacrep.tex

0
patacrep/data/templates/songs.tex → patacrep/data/templates/songbook/songs.tex

0
patacrep/data/latex/chords.sty → patacrep/data/templates/styles/chords.sty

0
patacrep/data/latex/crepbook.sty → patacrep/data/templates/styles/crepbook.sty

0
patacrep/data/latex/patacrep.sty → patacrep/data/templates/styles/patacrep.sty

0
patacrep/data/latex/songs.sty → patacrep/data/templates/styles/songs.sty

0
patacrep/data/latex/tabs.sty → patacrep/data/templates/styles/tabs.sty

2
patacrep/templates.py

@ -137,7 +137,7 @@ class TexBookRenderer(Renderer):
# Load templates in filesystem ... # Load templates in filesystem ...
loaders = [ loaders = [
FileSystemLoader(datadir) FileSystemLoader(datadir)
for datadir in files.iter_datadirs(datadirs, 'templates') for datadir in files.iter_datadirs(datadirs, 'templates', 'songbook')
] ]
jinjaenv = Environment( jinjaenv = Environment(
loader=ChoiceLoader(loaders), loader=ChoiceLoader(loaders),

6
test/test_songbook/content.tex.control

@ -13,9 +13,9 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/content_datadir/latex/} % {@TEST_FOLDER@/content_datadir/templates/styles/} %
{@TEST_FOLDER@/latex/} % {@TEST_FOLDER@/templates/styles/} %
{@DATA_FOLDER@/latex/} % {@DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

8
test/test_songbook/datadir.tex.control

@ -13,10 +13,10 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/datadir_datadir/latex/} % {@TEST_FOLDER@/datadir_datadir/templates/styles/} %
{@TEST_FOLDER@/datadir_datadir2/latex/} % {@TEST_FOLDER@/datadir_datadir2/templates/styles/} %
{@TEST_FOLDER@/latex/} % {@TEST_FOLDER@/templates/styles/} %
{@DATA_FOLDER@/latex/} % {@DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

4
test/test_songbook/lang_default.tex.control

@ -13,8 +13,8 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/latex/} % {@TEST_FOLDER@/templates/styles/} %
{@DATA_FOLDER@/latex/} % {@DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

4
test/test_songbook/lang_en.tex.control

@ -13,8 +13,8 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/latex/} % {@TEST_FOLDER@/templates/styles/} %
{@DATA_FOLDER@/latex/} % {@DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

4
test/test_songbook/lang_fr.tex.control

@ -13,8 +13,8 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/latex/} % {@TEST_FOLDER@/templates/styles/} %
{@DATA_FOLDER@/latex/} % {@DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

6
test/test_songbook/languages.tex.control

@ -13,9 +13,9 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/languages_datadir/latex/} % {@TEST_FOLDER@/languages_datadir/templates/styles/} %
{@TEST_FOLDER@/latex/} % {@TEST_FOLDER@/templates/styles/} %
{@DATA_FOLDER@/latex/} % {@DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

4
test/test_songbook/onthefly/content.onthefly.tex.control

@ -13,8 +13,8 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/onthefly/../content_datadir/latex/} % {@TEST_FOLDER@/onthefly/../content_datadir/templates/styles/} %
{@LOCAL_DATA_FOLDER@/latex/} % {@LOCAL_DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

6
test/test_songbook/syntax.tex.control

@ -13,9 +13,9 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/syntax_datadir/latex/} % {@TEST_FOLDER@/syntax_datadir/templates/styles/} %
{@TEST_FOLDER@/latex/} % {@TEST_FOLDER@/templates/styles/} %
{@DATA_FOLDER@/latex/} % {@DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

6
test/test_songbook/unicode.tex.control

@ -13,9 +13,9 @@
\makeatletter \makeatletter
\def\input@path{ % \def\input@path{ %
{@TEST_FOLDER@/unicode_datadir/latex/} % {@TEST_FOLDER@/unicode_datadir/templates/styles/} %
{@TEST_FOLDER@/latex/} % {@TEST_FOLDER@/templates/styles/} %
{@DATA_FOLDER@/latex/} % {@DATA_FOLDER@/templates/styles/} %
} }
\makeatother \makeatother

Loading…
Cancel
Save