From 312b63df60320bc3f96a83d6022d9483011da83c Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Fri, 13 Nov 2015 11:10:42 +0100 Subject: [PATCH] Change test_compilation extensions --- patacrep/build.py | 2 +- patacrep/content/tex.py | 4 +-- patacrep/songbook/__main__.py | 2 +- patacrep/songs/latex/__init__.py | 6 ++-- test/test_compilation/datadir.tex.control | 30 +++++++++---------- .../songs/{datadir.sgc => datadir.csg} | 0 .../songs/{datadir.sg => datadir.tsg} | 0 .../songs/{datadir2.sgc => datadir2.csg} | 0 .../songs/{datadir2.sg => datadir2.tsg} | 0 .../songs/{relative.sgc => relative.csg} | 0 .../songs/{relative.sg => relative.tsg} | 0 .../songs/subdir/{subdir.sgc => subdir.csg} | 0 .../songs/subdir/{subdir.sg => subdir.tsg} | 0 test/test_compilation/languages.tex.control | 10 +++---- .../songs/{language.sgc => language.csg} | 0 ...age_location.sgc => language_location.csg} | 0 .../{no_language.sgc => no_language.csg} | 0 ...{wrong_language.sgc => wrong_language.csg} | 0 ...{wrong_location.sgc => wrong_location.csg} | 0 test/test_compilation/syntax.tex.control | 2 +- .../songs/{musicnote.sgc => musicnote.csg} | 0 test/test_compilation/unicode.tex.control | 2 +- .../songs/{nonbreak.sgc => nonbreak.csg} | 0 23 files changed, 29 insertions(+), 29 deletions(-) rename test/test_compilation/datadir_datadir/songs/{datadir.sgc => datadir.csg} (100%) rename test/test_compilation/datadir_datadir/songs/{datadir.sg => datadir.tsg} (100%) rename test/test_compilation/datadir_datadir/songs/{datadir2.sgc => datadir2.csg} (100%) rename test/test_compilation/datadir_datadir/songs/{datadir2.sg => datadir2.tsg} (100%) rename test/test_compilation/datadir_datadir/songs/{relative.sgc => relative.csg} (100%) rename test/test_compilation/datadir_datadir/songs/{relative.sg => relative.tsg} (100%) rename test/test_compilation/datadir_datadir/songs/subdir/{subdir.sgc => subdir.csg} (100%) rename test/test_compilation/datadir_datadir/songs/subdir/{subdir.sg => subdir.tsg} (100%) rename test/test_compilation/languages_datadir/songs/{language.sgc => language.csg} (100%) rename test/test_compilation/languages_datadir/songs/{language_location.sgc => language_location.csg} (100%) rename test/test_compilation/languages_datadir/songs/{no_language.sgc => no_language.csg} (100%) rename test/test_compilation/languages_datadir/songs/{wrong_language.sgc => wrong_language.csg} (100%) rename test/test_compilation/languages_datadir/songs/{wrong_location.sgc => wrong_location.csg} (100%) rename test/test_compilation/syntax_datadir/songs/{musicnote.sgc => musicnote.csg} (100%) rename test/test_compilation/unicode_datadir/songs/{nonbreak.sgc => nonbreak.csg} (100%) diff --git a/patacrep/build.py b/patacrep/build.py index 0342959b..0526d5c2 100644 --- a/patacrep/build.py +++ b/patacrep/build.py @@ -109,7 +109,7 @@ class Songbook(object): datadirs=config.get('datadir', []), root_modules=['songs'], keyword='SONG_RENDERERS', - )['latex'] + )['tsg'] # Configuration set config['render'] = content.render diff --git a/patacrep/content/tex.py b/patacrep/content/tex.py index 0f520c19..badf58e6 100755 --- a/patacrep/content/tex.py +++ b/patacrep/content/tex.py @@ -33,7 +33,7 @@ def parse(keyword, argument, contentlist, config): """ if not contentlist: LOGGER.warning( - "Useless 'tex' content: list of files to include is empty." + "Useless 'tsg' content: list of files to include is empty." ) filelist = [] basefolders = itertools.chain( @@ -62,4 +62,4 @@ def parse(keyword, argument, contentlist, config): return filelist -CONTENT_PLUGINS = {'tex': parse} +CONTENT_PLUGINS = {'tsg': parse} diff --git a/patacrep/songbook/__main__.py b/patacrep/songbook/__main__.py index 004f3e95..d049cccb 100644 --- a/patacrep/songbook/__main__.py +++ b/patacrep/songbook/__main__.py @@ -153,7 +153,7 @@ def main(): # Command line options datadirs += [item[0] for item in options.datadir] if 'datadir' in songbook: - # .sg file + # .tsg file if isinstance(songbook['datadir'], str): songbook['datadir'] = [songbook['datadir']] datadirs += [ diff --git a/patacrep/songs/latex/__init__.py b/patacrep/songs/latex/__init__.py index d19cd10e..c9359f1c 100644 --- a/patacrep/songs/latex/__init__.py +++ b/patacrep/songs/latex/__init__.py @@ -49,9 +49,9 @@ class Latex2LatexSong(Song): self.lang = custom_lang SONG_RENDERERS = { - "latex": { - 'is': Latex2LatexSong, - 'sg': Latex2LatexSong, + "tsg": { + 'tis': Latex2LatexSong, + 'tsg': Latex2LatexSong, }, } diff --git a/test/test_compilation/datadir.tex.control b/test/test_compilation/datadir.tex.control index 14b11cb1..1df14c15 100644 --- a/test/test_compilation/datadir.tex.control +++ b/test/test_compilation/datadir.tex.control @@ -90,12 +90,7 @@ guitar, \begin{songs}{titleidx,authidx} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./datadir.sg - -\import{@TEST_FOLDER@/datadir_datadir/songs/}{datadir.sg} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./datadir.sgc +%% songs/./datadir.csg \selectlanguage{english} @@ -117,12 +112,12 @@ Chordpro}[ \endsong %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./datadir2.sg +%% songs/./datadir.tsg -\import{@TEST_FOLDER@/datadir_datadir/songs/}{datadir2.sg} +\import{@TEST_FOLDER@/datadir_datadir/songs/}{datadir.tsg} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./datadir2.sgc +%% songs/./datadir2.csg \selectlanguage{english} @@ -144,12 +139,12 @@ Chordpro}[ \endsong %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./relative.sg +%% songs/./datadir2.tsg -\import{@TEST_FOLDER@/datadir_datadir/songs/}{relative.sg} +\import{@TEST_FOLDER@/datadir_datadir/songs/}{datadir2.tsg} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./relative.sgc +%% songs/./relative.csg \selectlanguage{english} @@ -171,12 +166,12 @@ Chordpro}[ \endsong %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./subdir/subdir.sg +%% songs/./relative.tsg -\import{@TEST_FOLDER@/datadir_datadir/songs/subdir/}{subdir.sg} +\import{@TEST_FOLDER@/datadir_datadir/songs/}{relative.tsg} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./subdir/subdir.sgc +%% songs/./subdir/subdir.csg \selectlanguage{english} @@ -197,6 +192,11 @@ Chordpro}[ \endsong +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% songs/./subdir/subdir.tsg + +\import{@TEST_FOLDER@/datadir_datadir/songs/subdir/}{subdir.tsg} + \end{songs} diff --git a/test/test_compilation/datadir_datadir/songs/datadir.sgc b/test/test_compilation/datadir_datadir/songs/datadir.csg similarity index 100% rename from test/test_compilation/datadir_datadir/songs/datadir.sgc rename to test/test_compilation/datadir_datadir/songs/datadir.csg diff --git a/test/test_compilation/datadir_datadir/songs/datadir.sg b/test/test_compilation/datadir_datadir/songs/datadir.tsg similarity index 100% rename from test/test_compilation/datadir_datadir/songs/datadir.sg rename to test/test_compilation/datadir_datadir/songs/datadir.tsg diff --git a/test/test_compilation/datadir_datadir/songs/datadir2.sgc b/test/test_compilation/datadir_datadir/songs/datadir2.csg similarity index 100% rename from test/test_compilation/datadir_datadir/songs/datadir2.sgc rename to test/test_compilation/datadir_datadir/songs/datadir2.csg diff --git a/test/test_compilation/datadir_datadir/songs/datadir2.sg b/test/test_compilation/datadir_datadir/songs/datadir2.tsg similarity index 100% rename from test/test_compilation/datadir_datadir/songs/datadir2.sg rename to test/test_compilation/datadir_datadir/songs/datadir2.tsg diff --git a/test/test_compilation/datadir_datadir/songs/relative.sgc b/test/test_compilation/datadir_datadir/songs/relative.csg similarity index 100% rename from test/test_compilation/datadir_datadir/songs/relative.sgc rename to test/test_compilation/datadir_datadir/songs/relative.csg diff --git a/test/test_compilation/datadir_datadir/songs/relative.sg b/test/test_compilation/datadir_datadir/songs/relative.tsg similarity index 100% rename from test/test_compilation/datadir_datadir/songs/relative.sg rename to test/test_compilation/datadir_datadir/songs/relative.tsg diff --git a/test/test_compilation/datadir_datadir/songs/subdir/subdir.sgc b/test/test_compilation/datadir_datadir/songs/subdir/subdir.csg similarity index 100% rename from test/test_compilation/datadir_datadir/songs/subdir/subdir.sgc rename to test/test_compilation/datadir_datadir/songs/subdir/subdir.csg diff --git a/test/test_compilation/datadir_datadir/songs/subdir/subdir.sg b/test/test_compilation/datadir_datadir/songs/subdir/subdir.tsg similarity index 100% rename from test/test_compilation/datadir_datadir/songs/subdir/subdir.sg rename to test/test_compilation/datadir_datadir/songs/subdir/subdir.tsg diff --git a/test/test_compilation/languages.tex.control b/test/test_compilation/languages.tex.control index 59c233a7..6f08614f 100644 --- a/test/test_compilation/languages.tex.control +++ b/test/test_compilation/languages.tex.control @@ -91,7 +91,7 @@ guitar, \begin{songs}{titleidx,authidx} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./language.sgc +%% songs/./language.csg \selectlanguage{english} @@ -110,7 +110,7 @@ guitar, \endsong %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./language_location.sgc +%% songs/./language_location.csg \selectlanguage{french} @@ -129,7 +129,7 @@ guitar, \endsong %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./no_language.sgc +%% songs/./no_language.csg \selectlanguage{english} @@ -148,7 +148,7 @@ guitar, \endsong %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./wrong_language.sgc +%% songs/./wrong_language.csg \selectlanguage{english} @@ -167,7 +167,7 @@ guitar, \endsong %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./wrong_location.sgc +%% songs/./wrong_location.csg \selectlanguage{spanish} diff --git a/test/test_compilation/languages_datadir/songs/language.sgc b/test/test_compilation/languages_datadir/songs/language.csg similarity index 100% rename from test/test_compilation/languages_datadir/songs/language.sgc rename to test/test_compilation/languages_datadir/songs/language.csg diff --git a/test/test_compilation/languages_datadir/songs/language_location.sgc b/test/test_compilation/languages_datadir/songs/language_location.csg similarity index 100% rename from test/test_compilation/languages_datadir/songs/language_location.sgc rename to test/test_compilation/languages_datadir/songs/language_location.csg diff --git a/test/test_compilation/languages_datadir/songs/no_language.sgc b/test/test_compilation/languages_datadir/songs/no_language.csg similarity index 100% rename from test/test_compilation/languages_datadir/songs/no_language.sgc rename to test/test_compilation/languages_datadir/songs/no_language.csg diff --git a/test/test_compilation/languages_datadir/songs/wrong_language.sgc b/test/test_compilation/languages_datadir/songs/wrong_language.csg similarity index 100% rename from test/test_compilation/languages_datadir/songs/wrong_language.sgc rename to test/test_compilation/languages_datadir/songs/wrong_language.csg diff --git a/test/test_compilation/languages_datadir/songs/wrong_location.sgc b/test/test_compilation/languages_datadir/songs/wrong_location.csg similarity index 100% rename from test/test_compilation/languages_datadir/songs/wrong_location.sgc rename to test/test_compilation/languages_datadir/songs/wrong_location.csg diff --git a/test/test_compilation/syntax.tex.control b/test/test_compilation/syntax.tex.control index 6f213ef2..b2147b06 100644 --- a/test/test_compilation/syntax.tex.control +++ b/test/test_compilation/syntax.tex.control @@ -88,7 +88,7 @@ guitar, \begin{songs}{titleidx,authidx} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./musicnote.sgc +%% songs/./musicnote.csg \selectlanguage{english} diff --git a/test/test_compilation/syntax_datadir/songs/musicnote.sgc b/test/test_compilation/syntax_datadir/songs/musicnote.csg similarity index 100% rename from test/test_compilation/syntax_datadir/songs/musicnote.sgc rename to test/test_compilation/syntax_datadir/songs/musicnote.csg diff --git a/test/test_compilation/unicode.tex.control b/test/test_compilation/unicode.tex.control index 9c8e946d..759a15d8 100644 --- a/test/test_compilation/unicode.tex.control +++ b/test/test_compilation/unicode.tex.control @@ -88,7 +88,7 @@ guitar, \begin{songs}{titleidx,authidx} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./nonbreak.sgc +%% songs/./nonbreak.csg \selectlanguage{english} diff --git a/test/test_compilation/unicode_datadir/songs/nonbreak.sgc b/test/test_compilation/unicode_datadir/songs/nonbreak.csg similarity index 100% rename from test/test_compilation/unicode_datadir/songs/nonbreak.sgc rename to test/test_compilation/unicode_datadir/songs/nonbreak.csg