Python端口github.com/OnkelTem/ankidm
ankidmp的Python项目详细描述
ankidmpy
ankidmpy(发音为“anki dumpy”)是anki-dm到{PHP
编写的,是一个与Anki间隔重复存储器应用程序的CrowdAnki plugin配合使用的工具,以促进闪存卡组的协作构建。在
概述
CrowdAnki还旨在通过将Anki deck的所有细节提取到单个json文件中以便于编辑,从而促进协作。在此基础上,anki dm将这个单独的json文件拆分为多个文件:一个包含原始数据,一个用于卡片的模板布局,一个用于css样式设置,等等,允许对每个文件进行独立编辑。在
反过来,您可以build一个CrowdAnki文件,然后import这些文件返回到Anki,插件用于间隔重复记忆。在
使用
用法与原始的anki dm几乎相同,只是略有不同,以适应python
中的标准arg解析。在
$ python -m ankidmpy --help usage: anki-dm [-h][--base BASE][--templates]{init,import,build,copy,index} ... This tool disassembles CrowdAnki decks into collections of files and directories which are easy to maintain. It then allows you to can create variants of your deck via combining fields, templates and data that you really need. You can also use this tool to create translations of your deck by creating localized columns in data files. positional arguments: {init,import,build,copy,index} init Create a new deck from a template. import Import a CrowdAnki deck to Anki-dm format build Build Anki-dm deck into CrowdAnki format copy Make reindexed copy of Anki-dm deck. index Set guids for rows missing them. optional arguments: -h, --help show this help message and exit --base BASE Path to the deck set directory. [Default: src] --templates List all available templates. $
有几个子命令,每个子命令都有自己的选择。--base
开关适用于这些子命令中的每一个,并且必须在子命令之前提供。此开关指示在查找或生成新文件时要使用的根目录。在
--templates
开关只列出示例CrowdAnki可以在其基础上生成新的组,并且不需要子命令。在
子命令的帮助可以通过对子命令应用--help
找到:
建筑
ankidmpy当前是用纯粹的Python
编写的,没有依赖关系。到目前为止,我只在python3.7
中尝试过,但它可能在早期版本中有效。在
您可以使用python -m ankidmpy
运行ankidmpy,方法是将PYTHONPATH
指向src
目录,或者使用poetry来构建一个控制盘分发,如下所示:
$ poetry install $ poetry build
运行poetry install
之后,还可以使用poetry脚本运行ankidmpy,如下所示:
$ poetry run anki-dm --help
有关详细信息,请参阅poetry文档。在
- 项目
标签: