diff --git a/.gitignore b/.gitignore index 30dfc5657512cd927f6e5bf4c31656e5594d6f29..92e77cb19fb8a1decc2b35bff0406f431e34a6f5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ CHANGELOG.md hanzi-data templates -LICENSE -NOTICE out diff --git a/README.md b/README.md index 8402f01c92f0a893ddb4f11718f79ec893fa4bd6..bf7c841a459ea85c6d5f8334bc303b847c060ca1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/content/Vocabulary-from-Anki/.apkg-spec.yaml b/content/Vocabulary-from-Anki/.apkg-spec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..751e5f0223acfa7f0a9c12fb1601546261c74ab1 --- /dev/null +++ b/content/Vocabulary-from-Anki/.apkg-spec.yaml @@ -0,0 +1,31 @@ +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: [] diff --git a/content/Vocabulary-from-Anki/Chinesisch.txt b/content/Vocabulary-from-Anki/Chinesisch.txt new file mode 100644 index 0000000000000000000000000000000000000000..179e13378b71942bb6cf6239725ee6b723b15a99 --- /dev/null +++ b/content/Vocabulary-from-Anki/Chinesisch.txt @@ -0,0 +1,8 @@ +#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 好 diff --git a/content/Vocabulary-from-Anki/README.md b/content/Vocabulary-from-Anki/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5eb25e4dbe410b2e7ce18bbc5d4486fcc35dfc56 --- /dev/null +++ b/content/Vocabulary-from-Anki/README.md @@ -0,0 +1,17 @@ +# 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. diff --git a/package.json b/package.json index e7451c7df89e1206cb1950e461b3791079a26c2d..afba5c5c41450da97c7e16bb8afb74bc0797f914 100644 --- a/package.json +++ b/package.json @@ -1,3 +1,3 @@ { - "version": "1.0.0-starter6" + "version": "1.0.0-starter7" }