Skip to content
Snippets Groups Projects
Commit f79fe343 authored by Philipp Stadler's avatar Philipp Stadler
Browse files

feat(starter): add Anki example

parent 858ff371
Branches
Tags 1.0.0-starter7
No related merge requests found
CHANGELOG.md
hanzi-data
templates
LICENSE
NOTICE
out
......@@ -40,13 +40,14 @@ or
To add new content to this pack, either add `.apkg` files in the root next to
`content` to include them unchanged, OR add subfolders to `content/` with data
in the form of CSV, images or APKGs and an `.apkg-spec.yaml` file that
configures which HTML too use for the cards and how your data is laid out.
configures which HTML to use for the cards and how your data is laid out.
You can use the content in the starter template as your basis or just have a
look to see how it works:
* [content/Facts-from-CSV](https://gitlab.phaidra.org/kartenaale/templates/anki-pack/-/tree/main/content/Facts-from-CSV) for Q/A cards imported from a CSV file,
* [content/Bijection-from-CSV](https://gitlab.phaidra.org/kartenaale/templates/anki-pack/-/tree/main/content/Bijection-from-CSV) for cards that work both ways, where the answer is also a question,
* [content/Bijection-from-Images](https://gitlab.phaidra.org/kartenaale/templates/anki-pack/-/tree/main/content/Bijection-from-Images) for two cards, one to remember the image and one to remember the label in the filename.
* [content/Bijection-from-Images](https://gitlab.phaidra.org/kartenaale/templates/anki-pack/-/tree/main/content/Bijection-from-Images) for two cards, one to remember the image and one to remember the label in the filename,
* [content/Vocabulary-from-Anki](https://gitlab.phaidra.org/kartenaale/templates/anki-pack/-/tree/main/content/Vocabulary-from-Anki) for vocabulary cards, with an Anki text export of simple notes as the data source.
To get your changes back into the repository and test them, create a new branch
with your changes and open a merge request. Check the APKGs in the CI/CD build
......
content_version: 1.0.0
templates:
- molaoshi
content:
- import_csv:
content_version: 2024-01-19 19:00:00+00:00
note_type: Vokabeln
file_patterns:
- '*.txt'
delimiter: "\t"
# Not needed because the CSV contains the deck name
deck_name_pattern: 'UNUSED'
fields_mapping:
- guid
# ignoriere den Kartentyp
- ''
# Dritte Spalte ist Deckname
- deck
- Deutsch
- 简体字
fields_static:
Schreiben anlegen: 'true'
# Mehr optionale Kartentypen aktivieren:
# Radikal finden anlegen: 'true'
# Radikal finden (繁體字) anlegen: 'true'
# Lesen (繁體字) anlegen: 'true'
tags: []
resource_paths: []
#separator:tab
#html:true
#guid column:1
#notetype column:2
#deck column:3
#tags column:6
sA:>|UEhWR Basic Chinesisch::Teil 1 Tapir 貘
fVVAK}&Gs~ Basic Chinesisch::Teil 1 gut 好
# Vocabulary from Anki
This example builds Vocabulary cards from simple Front/Back cards that were
exported from Anki.
To generate the .txt file, click the wheel when hovering the root of thr deck
you want to export and hit _Export…_ and select _Notes in Plain Text (.txt)_ as
the format. Check everything, e.g. the deck name and unique identifier.
See [.apkg-spec.yaml](.apkg-spec.yaml) for an example of how to handle such a
file.
## Images
If you use images, put them into a directory and add that to the resource path.
See for example
[sinology-1](https://gitlab.phaidra.org/kartenaale/packs/sinology-1/-/blob/main/content/Einf%C3%BChrung-in-die-politische-Geschichte-Chinas/.apkg-spec.yaml)
as an example of how to do this.
{
"version": "1.0.0-starter6"
"version": "1.0.0-starter7"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment