theme.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:gns3-documentation-template 作者: GNS3 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号