|
|
@ -4,9 +4,8 @@ from jinja2 import Environment, FileSystemLoader, contextfunction, ChoiceLoader |
|
|
|
import jinja2 |
|
|
|
import logging |
|
|
|
import os |
|
|
|
from pkg_resources import resource_filename |
|
|
|
|
|
|
|
from patacrep import encoding, files |
|
|
|
from patacrep import encoding, files, pkg_datapath |
|
|
|
from patacrep.songs import Song |
|
|
|
from patacrep.songs.chordpro.syntax import parse_song |
|
|
|
from patacrep.templates import Renderer |
|
|
@ -49,7 +48,7 @@ class ChordproSong(Song): |
|
|
|
self.get_datadirs(os.path.join("templates", self.output_language)) |
|
|
|
), |
|
|
|
FileSystemLoader( |
|
|
|
os.path.join(resource_filename(__name__, 'data'), self.output_language) |
|
|
|
os.path.join(pkg_datapath('ast_templates'), 'chordpro', self.output_language) |
|
|
|
), |
|
|
|
])) |
|
|
|
jinjaenv.filters['search_image'] = self.search_image |
|
|
|