Browse Source

Implémentation du plugin cwd (#43)

pull/47/head
Louis 11 years ago
parent
commit
1e2dfc7d91
  1. 16
      songbook_core/content/cwd.py

16
songbook_core/content/cwd.py

@ -0,0 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from songbook_core.content import process_content
def parse(keyword, config, argument, contentlist):
config['songdir'] = (
[os.path.relpath(argument)] +
[os.path.join(path, argument) for path in config['songdir']] +
config['songdir']
)
return process_content(contentlist, config)
CONTENT_PLUGINS = {'cwd': parse}
Loading…
Cancel
Save