Anki加载项生成器
aab的Python项目详细描述
anki加载项生成器
一个固执己见的anki插件构建工具。在我的主要安基项目中使用。
免责声明
项目状态
这项工作仍在进行中。api和实现都不是一成不变的。此时,该项目的主要目的是替换我在所有附加组件中使用的各种不同的构建脚本,使构建链更加标准化和可维护。
平台支持
aab
到目前为止只在linux上测试过,但它也可能在其他与posix兼容的环境(比如macos)上工作。
安装
要求
aab
需要在anki开发环境中运行才能正常工作。请参阅Anki's documentation了解如何设置此项的信息。
安装最新版本
pip install aab
从主分支安装
pip install --upgrade git+https://github.com/glutanimate/anki-addon-builder.git
使用量
pip install aab
pip install --upgrade git+https://github.com/glutanimate/anki-addon-builder.git
使用量
通过访问内置帮助,您可以获得所有支持操作的概述:
$ aab -h
usage: aab [-h] [-v] [-s] {build,ui,clean} ...
positional arguments:
{build,ui,clean}
build Build and package add-on for distribution
ui Compile add-on user interface files
clean Clean leftover build files
optional arguments:
-h, --help show this help message and exit
-v, --verbose Enable verbose output
每个子命令还带有自己的帮助屏幕,例如:
$ aab build -h
usage: aab build [-h] [-t {anki21,anki20,all}] [-d {local,ankiweb,all}]
[version]
positional arguments:
version Version to build as a git reference (e.g. 'v1.2.0' or
'd338f6405'). Special keywords: 'current' – latest
commit, 'release' – latest tag. Leave empty to build
latest tag.
optional arguments:
-h, --help show this help message and exit
-t {anki21,anki20,all}, --target {anki21,anki20,all}
Anki version to build for
-d {local,ankiweb,all}, --dist {local,ankiweb,all}
Distribution channel to build for
示例
build最新标记的附加组件版本
aab build -d local -t anki21 release
或者干脆
aab build
为anki 2.1编译qt ui表单和资源
aab ui -t anki21
规格
项目结构
为了使aab
正常工作,您的项目通常应该遵循以下目录结构:
project root
├── src [required] (contains add-on package and Anki 2.0 entry-point)
│ ├── {module_name} [required] (add-on package)
| └── {display_name}.py [optional] (Anki 2.0 entry-point)
└── addon.json [required] (contains add-on meta information read by aab)
要更详细地查看整个目录树,请随意查看一些add-ons I've published recently。
加载项.json
aab
正常工作所需的所有元数据都存储在项目树根目录下的addon.json
文件中。有关其字段及其规范的更多信息,请参阅schema file。
许可证和信用证
anki加载项生成器是版权所有©2019 Aristotelis P.(谷胱甘肽)
Anki插件生成器是免费的开源软件。它的源代码是根据gnu agplv3许可证发布的,该许可证由一些附加条款扩展。有关详细信息,请参阅此程序附带的license file。
这个程序的发布是希望它会有用,但没有任何保证。有关详细信息,请参阅许可证文件。