Browse Source

Automatically load song rendered plugins

pull/227/head
Oliverpool 9 years ago
parent
commit
95434c5c02
  1. 4
      patacrep/build.py
  2. 2
      patacrep/content/song.py
  3. 5
      test/test_content/test_content.py

4
patacrep/build.py

@ -79,10 +79,6 @@ class Songbook:
copy.deepcopy(self._config['authors'])
)
self._config['_song_plugins'] = files.load_plugins_songs(
datadirs=self._config['_datadir'],
)['tsg']
# Configuration set
self._config['render'] = content.render
self._config['content'] = content.process_content(

2
patacrep/content/song.py

@ -87,7 +87,7 @@ def parse(keyword, argument, config):
contentlist = argument
if isinstance(contentlist, str):
contentlist = [contentlist]
plugins = config['_song_plugins']
plugins = files.load_plugins_songs(config['_datadir'])['tsg']
if '_langs' not in config:
config['_langs'] = set()
songlist = ContentList()

5
test/test_content/test_content.py

@ -107,9 +107,4 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest):
outputdir
)
# Load the plugins
config['_song_plugins'] = files.load_plugins_songs(
datadirs=config['_datadir'],
)['tsg']
return config

Loading…
Cancel
Save