def __init__(self, export_dir):
self._export_dir = export_dir
if os.path.exists(os.path.join(export_dir, 'theme')):
shutil.rmtree(os.path.join(export_dir, 'theme'))
shutil.copytree('theme', os.path.join(export_dir, 'theme'))
self._env = Environment(loader=ChoiceLoader([
FileSystemLoader(os.path.join(export_dir, 'theme')),
]))
self._env.filters['strftime'] = strftime
self._env.filters['youtube_channel'] = youtube_channel
self._env.filters['youtube_playlist'] = youtube_playlist
self._env.filters['theme'] = self._theme
评论列表
文章目录