A tool converting words to cards for Anki to import.
Project description
简介
将单词批量转换为 Anki 卡片,数据来源:
-
macOS 端预览:
手机端预览:
使用环境
使用方法
一、准备单词文件
以换行分隔,#
开头的行将被忽略,例如vocabulary.txt
:
dread
dreadful
handicap
competitor
competition
competitive
competitiveness
adhere to sth
fulfill
# account
# list
in terms of
reflect on
abbreviate
cater for sb/sth
二、运行脚本
方式一:通过 pip 安装
$ pip3 install dict2anki
$ dict2anki -i /path/to/vocabulary.txt
方式二:下载源码
$ git clone https://github.com/qianbinbin/dict2anki.git && cd dict2anki
$ # git clone git@github.com:qianbinbin/dict2anki.git && cd dict2anki
$ # wget https://github.com/qianbinbin/dict2anki/archive/master.zip && unzip master.zip && cd dict2anki-master
$ python3 -m dict2anki -i /path/to/vocabulary.txt
使用 -i
参数指定输入单词文件。
默认在当前目录下生成。
cards.txt
以追加形式增加内容,可以多次运行脚本以便输入到同一 cards.txt
文件。
三、导入
1. 新建模板
打开桌面版 Anki,工具
-> 管理笔记类型
-> 添加
-> 基础
,输入名称,例如 基础单词
,选中 基础单词
,点击右侧 卡片
,
- 将
front_template.txt
中的内容复制到正面模板
, - 将
styling.txt
中的内容复制到格式刷
, - 将
back_template.txt
中的内容复制到背面模板
,
以上“复制”指完全替换,不是粘贴到原始内容后。
2. 复制媒体文件
将 collection.media
文件夹中的文件全部复制到 Anki 文件夹 对应用户的 collection.media
文件夹下。
3. 导入卡片
创建所需记忆库,例如 英语单词
。
文件
-> 导入
,选择 cards.txt
,类型
选择刚刚新建的笔记类型 基础单词
,牌组
选择 英语单词
,勾选 允许在字段中使用 HTML
,点击 导入
。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dict2anki-0.2.6.tar.gz
(12.2 kB
view hashes)
Built Distribution
dict2anki-0.2.6-py3-none-any.whl
(12.8 kB
view hashes)
Close
Hashes for dict2anki-0.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6465c7e76f957eba9ae0f8738b7d98148a1834de56e9691048c51d5aeffad05 |
|
MD5 | e4bea8e943ee32d1fadc853f07ca5d39 |
|
BLAKE2b-256 | 50e0628d150a69882083bd433db0c1d77bd69763329cc6bd00c57d0a8c329ab9 |