Skip to content

Commit 10f904c

Browse files
committed
Update version to 0.1.4 and enhance documentation
- Updated version numbers in ankiweb.json and manifest.json to 0.1.4. - Changed the homepage link in manifest.json to the new GitHub repository. - Added a new README_EN.md file with comprehensive installation and usage instructions for English-speaking users. - Improved formatting and clarity in README.md for better user experience.
1 parent c7a61d7 commit 10f904c

File tree

4 files changed

+155
-10
lines changed

4 files changed

+155
-10
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# LexiSage - Anki智能释义插件
22

3+
[English](README_EN.md) | 中文
4+
35
> LexiSage – Let your cards speak with clarity and wisdom.
46
57
## 项目简介
@@ -24,17 +26,17 @@
2426

2527
### 基本配置
2628

27-
1. 打开Anki,在“工具”菜单中选择"LexiSage 设置..."
29+
1. 打开Anki,在"工具"菜单中选择"LexiSage 设置..."
2830
2. 设置 AI 服务。插件本身不提供 AI 服务,需要用户自行购买 AI 服务商的 API Key 填入插件中,在获得 API Key 之后,选择对应的服务商,填写正确的 API Key 和要使用的模型。
2931
AI 服务商推荐
3032
- [xAI](https://console.x.ai)(充 5 刀每个月送 150 刀,很划算)
3133
- [DeepSeek](https://platform.deepseek.com)(国产 AI 之光)
32-
34+
3335
![image](https://github.com/user-attachments/assets/1d33d54d-ca04-4507-83bd-84267557fb0a)
3436
3. 为你的笔记类型添加配置,指定模板中要 AI 解释的字段,指定存放输出结果的字段,还可以为单词指定上下文,根据上下文来释义。
35-
37+
3638
![image](https://github.com/user-attachments/assets/ca6f59d6-ab80-4911-b6e0-24c5f3fa0e49)
37-
39+
3840
- 点 + 号添加笔记类型配置
3941
- 选择要解释的字段
4042
- 选择上下文字段(可选)
@@ -46,13 +48,13 @@
4648

4749
1. 浏览牌组
4850
2. 选择要生成释义卡片
49-
3. 点击菜单栏LexiSage”-“批量生成释义,等待完成
50-
51+
3. 点击菜单栏"LexiSage"-"批量生成释义",等待完成
52+
5153
![image](https://github.com/user-attachments/assets/6ebbb32e-e9a9-4f84-96d1-cc05041e3b8c)
5254

5355
### 自定义 Prompt
5456

55-
本插件内置了 Prompt,如果你对释义的结果不满意,可以在LexiSage 设置中自定义提示词
57+
本插件内置了 Prompt,如果你对释义的结果不满意,可以在"LexiSage 设置"中自定义提示词
5658

5759
## 开发指南
5860

README_EN.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# LexiSage - AI Definition Generator for Anki
2+
3+
English | [中文](README.md)
4+
5+
> LexiSage – Let your cards speak with clarity and wisdom.
6+
7+
## Project Overview
8+
[LexiSage](https://ankiweb.net/shared/info/750479332?cb=1744698675805) is an intelligent definition plugin designed for Anki that supports multiple AI interfaces (OpenAI, XAI, DeepSeek) to generate explanations for selected fields. It's especially useful for language learners.
9+
10+
### Key Features
11+
- Automatic parsing of word meanings and usage
12+
- Context-based word explanations
13+
- Batch processing to improve study efficiency
14+
- Customizable system prompts
15+
- Support for multiple note types
16+
- Support for various AI services (requires your own API Keys)
17+
18+
## Installation
19+
20+
1. In Anki, click "Tools" > "Add-ons"
21+
2. Click "Get Add-ons"
22+
3. Enter the add-on code: **750479332**
23+
4. Restart Anki
24+
25+
## Usage Instructions
26+
27+
### Basic Configuration
28+
29+
1. Open Anki, select "LexiSage Settings..." from the "Tools" menu
30+
2. Set up AI services. The plugin doesn't provide AI services itself, so you need to purchase API Keys from AI service providers and enter them into the plugin. After obtaining an API Key, select the corresponding service provider and fill in the correct API Key and the model you want to use.
31+
Recommended AI service providers:
32+
- [xAI](https://console.x.ai) (Great value: $5 monthly charge gives you $150 credit)
33+
- [DeepSeek](https://platform.deepseek.com) (Leading Chinese AI platform)
34+
35+
![image](https://github.com/user-attachments/assets/1d33d54d-ca04-4507-83bd-84267557fb0a)
36+
3. Add configuration for your note types, specify which template fields the AI should explain, designate output result fields, and optionally add context for more accurate definitions.
37+
38+
![image](https://github.com/user-attachments/assets/ca6f59d6-ab80-4911-b6e0-24c5f3fa0e49)
39+
40+
- Click the + button to add note type configuration
41+
- Select the field to explain
42+
- Select context field (optional)
43+
- Select destination field for definitions
44+
- Save configuration
45+
(This plugin supports configuring multiple note types, allowing batch processing of different note types simultaneously)
46+
47+
### Generating Definitions
48+
49+
1. Browse your card collection
50+
2. Select the cards for which you want to generate definitions
51+
3. Click "LexiSage" > "Generate Batch Definitions" in the menu bar, then wait for completion
52+
53+
![image](https://github.com/user-attachments/assets/6ebbb32e-e9a9-4f84-96d1-cc05041e3b8c)
54+
55+
### Custom Prompts
56+
57+
The plugin includes built-in prompts, but if you're not satisfied with the definition results, you can customize the prompts in "LexiSage Settings"
58+
59+
## Development Guide
60+
61+
### Environment Setup
62+
1. Clone this repository
63+
2. Ensure you have Python 3.8+ installed
64+
3. Install dependencies: `pip install -r requirements.txt` (if available)
65+
66+
### Project Structure
67+
- `__init__.py`: Plugin entry point and main functionality
68+
- `config_ui.py`: Configuration UI interface
69+
- `ai_service.py`: AI service API interface
70+
- `prompts.py`: Default prompt templates
71+
72+
### Packaging the Plugin
73+
1. Ensure the project includes the following necessary files:
74+
- `__init__.py`: Plugin entry point
75+
- `ai_service.py`: AI service interface
76+
- `config_ui.py`: Configuration interface
77+
- `prompts.py`: Default prompts
78+
- `manifest.json`: Plugin metadata, including name, version, etc.
79+
- `meta.json`: Anki version compatibility information (important, determines supported Anki versions)
80+
- `config.json`: Default configuration (optional)
81+
- `LICENSE`: License file
82+
83+
2. Update version numbers:
84+
- Update the `version` field in the `manifest.json` file
85+
- Synchronize the version number in the `ankiweb.json` file (used for AnkiWeb submissions)
86+
87+
3. Package with the following command:
88+
```bash
89+
zip -r anki_lexisage.ankiaddon __init__.py ai_service.py config_ui.py prompts.py manifest.json meta.json LICENSE config.json -x ".*" "__pycache__/*" "*.pyc"
90+
```
91+
92+
4. Verify package contents:
93+
```bash
94+
unzip -l anki_lexisage.ankiaddon
95+
```
96+
Ensure it contains only necessary files, without extraneous `.git`, `__pycache__`, etc.
97+
98+
5. Test installation:
99+
- Install the `.ankiaddon` file in a test environment using Anki's "Install from file" function
100+
- Verify that the plugin functions correctly
101+
102+
### Submitting to AnkiWeb
103+
1. Register an [AnkiWeb account](https://ankiweb.net/account/register)
104+
2. After logging in, visit the [sharing page](https://ankiweb.net/shared/info/)
105+
3. Click "Upload Add-on" to submit your plugin
106+
4. Fill in plugin information and upload the packaged file
107+
5. Wait for approval
108+
109+
## Contribution Guidelines
110+
Contributions of code, issue reports, or feature suggestions are welcome!
111+
112+
1. Fork this repository
113+
2. Create your feature branch: `git checkout -b feature/amazing-feature`
114+
3. Commit your changes: `git commit -m 'Add some amazing feature'`
115+
4. Push to the branch: `git push origin feature/amazing-feature`
116+
5. Open a Pull Request
117+
118+
## License
119+
This project uses the [MIT License](LICENSE) - see the LICENSE file for details.
120+
121+
## Acknowledgements
122+
- Thanks to all contributors and users
123+
- Special thanks to the Anki development team for providing an excellent platform
124+
125+
## Supported AI Services
126+
- **OpenAI**: Supports GPT-3.5/GPT-4 and other models
127+
- **XAI**: Supports custom API interfaces
128+
- **DeepSeek**: Supports DeepSeek Chat models
129+
130+
## Custom Prompts
131+
In prompt templates, you can use the following variables:
132+
- `{word}`: Represents the content of the field to explain
133+
- `{context}`: Represents the content of the context field (if any)
134+
135+
## Troubleshooting
136+
- If the plugin doesn't work properly, check:
137+
- Whether your API key is correct
138+
- Whether your network connection is stable
139+
- Whether you've selected the correct fields
140+
- If you encounter problems, try restarting Anki
141+
142+
## Privacy Statement
143+
This plugin sends your card content to the AI service you configure, so please ensure you understand the relevant privacy policies. API keys are stored only in local configuration files and are not uploaded.

ankiweb.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"display_name": "LexiSage - Anki智能释义插件",
33
"module_name": "anki_lexisage",
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"description": "利用AI生成单词或短语的详细释义,支持多笔记类型配置,适合语言学习者。",
66
"name_en": "LexiSage - AI Definition Generator",
77
"description_en": "Generate detailed explanations for words or phrases using AI. Supports multiple note types and is ideal for language learners.",

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "LexiSage - Anki智能释义插件",
33
"package": "anki_lexisage",
4-
"version": "0.1.3",
5-
"homepage": "https://github.com/zyidong/anki-lexisage",
4+
"version": "0.1.4",
5+
"homepage": "https://github.com/GeekyGuang/LexiSage",
66
"conflicts": []
77
}

0 commit comments

Comments
 (0)