|
@ -28,16 +28,14 @@ def parse(keyword, config, argument): |
|
|
The 'path' is added: |
|
|
The 'path' is added: |
|
|
- first as a relative path to the *.yaml file directory; |
|
|
- first as a relative path to the *.yaml file directory; |
|
|
- then as a relative path to every path already present in |
|
|
- then as a relative path to every path already present in |
|
|
config['songdir']. |
|
|
config['songdir'] (which are actuel song dir inside the datadir). |
|
|
""" |
|
|
""" |
|
|
subpath = argument['path'] |
|
|
subpath = argument['path'] |
|
|
old_songdir = config['_songdir'] |
|
|
old_songdir = config['_songdir'] |
|
|
|
|
|
|
|
|
songdirs = [] |
|
|
config['_songdir'] = [path.clone().join(subpath) for path in config['_songdir']] |
|
|
if '_songbookfile_dir' in config: |
|
|
if '_songbookfile_dir' in config: |
|
|
songdirs.extend([DataSubpath(config['_songbookfile_dir'], subpath)]) |
|
|
config['_songdir'].insert(0, DataSubpath(config['_songbookfile_dir'], subpath)) |
|
|
songdirs.extend(path.clone().join(subpath) for path in config['_songdir']) |
|
|
|
|
|
config['_songdir'] = songdirs |
|
|
|
|
|
|
|
|
|
|
|
processed_content = process_content(argument.get('content'), config) |
|
|
processed_content = process_content(argument.get('content'), config) |
|
|
config['_songdir'] = old_songdir |
|
|
config['_songdir'] = old_songdir |
|
|