-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
3,552 additions
and
454 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
custom: https://afdian.com/a/leoly | ||
custom: | ||
- https://ko-fi.com/M4M212WUCI | ||
- https://afdian.com/a/leoly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
|
||
jobs: | ||
build: | ||
|
@@ -25,6 +29,8 @@ jobs: | |
version: '0.4.27' | ||
- name: Package Test | ||
run: pnpm run package | ||
- name: Build playground | ||
run: pnpm run pg-build | ||
|
||
- name: Upload APKGs | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Playground | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
if: | | ||
!startsWith(github.event.head_commit.message , 'chore: release') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
deployments: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
- name: Use Node.js 23 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '23.6' | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- run: pnpm test | ||
- run: pnpm run build | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
with: | ||
version: '0.4.27' | ||
- name: Package Test | ||
run: pnpm run package | ||
- name: Build playground | ||
run: pnpm run pg-build | ||
- name: Publish | ||
uses: cloudflare/pages-action@v1 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
projectName: 'anki-template' | ||
directory: 'playground/dist' | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,123 +1,23 @@ | ||
# ikkz Templates | ||
|
||
For the directly usable version, please download it from the [release](https://github.com/ikkz/anki-template/releases). | ||
|
||
> [!TIP] | ||
> Each template has multiple variants available for download, with the filename format being `{template}.{locale}.{field}.apkg` | ||
> | ||
> Be sure to read the specific instructions and tips for each template below before use | ||
``` | ||
template: | ||
- mcq : Multiple choice question (6 options) | ||
- mcq_10: Multiple choice question (10 options) | ||
- tf : True or false | ||
- basic : Basic Q&A | ||
- match : Drag and drop interactive matching | ||
locale: | ||
- zh: 中文 | ||
- en: English | ||
- ja: Japanese | ||
field: | ||
- native : The native Anki field | ||
- markdown: With markdown support, but larger size | ||
``` | ||
For the directly usable version, please download it from the [here](https://template.ikkz.fun). | ||
|
||
For suggestions and feedback, please submit them [here](https://github.com/ikkz/anki-template/issues). | ||
|
||
## Templates | ||
|
||
| Template | Description | Links | | ||
| -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | ||
| mcq | Multiple choice question (6 options) | [Preview](https://template.ikkz.fun/?template=mcq.en.native) [Docs](https://template.ikkz.fun/docs/mcq) | | ||
| mcq_10 | Multiple choice question (10 options) | [Preview](https://template.ikkz.fun/?template=mcq_10.en.native) [Docs](https://template.ikkz.fun/docs/mcq_10) | | ||
| match | Drag and drop interactive matching | [Preview](https://template.ikkz.fun/?template=match.en.native) [Docs](https://template.ikkz.fun/docs/match) | | ||
| tf | True or false | [Preview](https://template.ikkz.fun/?template=tf.en.native) [Docs](https://template.ikkz.fun/docs/tf) | | ||
| basic | Basic Q&A | [Preview](https://template.ikkz.fun/?template=basic.en.native) [Docs](https://template.ikkz.fun/docs/basic) | | ||
|
||
All of the templates have the following common features: | ||
|
||
- Markdown support: see [here](/docs/markdown.md) for details | ||
- Markdown support: see [here](https://template.ikkz.fun/docs/markdown) for details | ||
- After selecting text, you can directly click to ask gpt, search or translate the corresponding text, and customization is also supported | ||
- Support larger question text. | ||
- Support dark mode and light mode. | ||
- Countdown: Give you motivation to learn. | ||
|
||
### Multiple Choice | ||
|
||
- Support hiding options to avoid potential answer hints | ||
- Support single choice and multiple choice. | ||
- Scrambled question options are restored after showing the answer. | ||
- Obvious answer markers. | ||
|
||
#### Fields | ||
|
||
Note: When all options are empty, the template will behave as a basic Q&A template | ||
|
||
| Field name | Description | | ||
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| question | This is the stem of the question. It supports various content formats in Anki, including bold, formulas, etc. | | ||
| optionA...F | This is the content of the question options. Options that are not filled in will not be displayed, and various formats are also supported. | | ||
| answer | This is the answer to the question. For multiple-choice questions, please write the uppercase letter of the correct answer, for example, A. For multiple-choice questions, write all the correct answer letters, such as ABC. | | ||
| note | You can fill in detailed explanations, notes, etc., here. | | ||
| noteA...F | You can fill in detailed explanations, notes for every option | | ||
|
||
### Match | ||
|
||
Drag and drop interactive matching question template. | ||
|
||
> [!TIP] | ||
> It is best to disable all swipe gesture controls in Anki's review settings. | ||
#### Fields | ||
|
||
Notes for `items` | ||
|
||
- Each line starts with a category, followed by two colons separating it from the items under that category | ||
- Each item is separated by two commas | ||
|
||
An example: | ||
|
||
``` | ||
Mammals::Tiger,,Elephant | ||
Birds::Penguin,,Parrot | ||
Reptiles::Cobra,,Crocodile | ||
``` | ||
|
||
| Field name | Description | | ||
| ---------- | ------------------------------------------------------------------------------------------------------------- | | ||
| question | This is the stem of the question. It supports various content formats in Anki, including bold, formulas, etc. | | ||
| items | The category and items | | ||
| note | You can fill in detailed explanations, notes, etc., here. | | ||
|
||
### True or False | ||
|
||
#### Fields | ||
|
||
Notes for `items` | ||
|
||
- All sub-questions should meet the format constriant | ||
- Each sub-question must begin with a line "T===" or "F===", indicating whether the sub-question is true or false | ||
- Pay special attention to ensuring "T/F" is followed by three or more equal signs | ||
|
||
| Field name | Description | | ||
| ---------- | ------------------------------------------------------------------------------------------------------------- | | ||
| question | This is the stem of the question. It supports various content formats in Anki, including bold, formulas, etc. | | ||
| items | The sub-questions | | ||
| note | You can fill in detailed explanations, notes, etc., here. | | ||
|
||
### Basic | ||
|
||
A Simple Q&A Template | ||
|
||
#### Fields | ||
|
||
| Field name | Description | | ||
| ---------- | ------------------------------------------------------------------------------------------------------------- | | ||
| question | This is the stem of the question. It supports various content formats in Anki, including bold, formulas, etc. | | ||
| answer | This is the answer to the question, and various formats are also supported | | ||
| note | You can fill in detailed explanations, notes, etc., here. | | ||
|
||
## Screenshots | ||
|
||
<img width="632" alt="image" src="https://github.com/user-attachments/assets/edce65fd-2560-47db-a6e5-ffe7dcd00a02"> | ||
|
||
<img width="609" alt="图片" src="https://github.com/user-attachments/assets/143df030-a8d7-4fdc-9566-927b70aa4921" /> | ||
|
||
<img width="552" alt="图片" src="https://github.com/user-attachments/assets/b70ee32f-6ad3-4374-9224-8b6d54d57f9a" /> | ||
|
||
<img width="552" alt="图片" src="https://github.com/user-attachments/assets/3bfadeee-1876-4e3c-90ee-1c6ad53d71d3" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Basic | ||
|
||
A Simple Q&A Template | ||
|
||
## Fields | ||
|
||
| Field name | Description | | ||
| ---------- | ------------------------------------------------------------------------------------------------------------- | | ||
| question | This is the stem of the question. It supports various content formats in Anki, including bold, formulas, etc. | | ||
| answer | This is the answer to the question, and various formats are also supported | | ||
| note | You can fill in detailed explanations, notes, etc., here. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Match | ||
|
||
Drag and drop interactive matching question template. | ||
|
||
> [!TIP] | ||
> It is best to disable all swipe gesture controls in Anki's review settings. | ||
## Fields | ||
|
||
Notes for `items` | ||
|
||
- Each line starts with a category, followed by two colons separating it from the items under that category | ||
- Each item is separated by two commas | ||
|
||
An example: | ||
|
||
``` | ||
Mammals::Tiger,,Elephant | ||
Birds::Penguin,,Parrot | ||
Reptiles::Cobra,,Crocodile | ||
``` | ||
|
||
| Field name | Description | | ||
| ---------- | ------------------------------------------------------------------------------------------------------------- | | ||
| question | This is the stem of the question. It supports various content formats in Anki, including bold, formulas, etc. | | ||
| items | The category and items | | ||
| note | You can fill in detailed explanations, notes, etc., here. | |
Oops, something went wrong.