diff --git a/README.md b/README.md index aacbfdebd85cdfda52f7c71daba9f40da6fcd19f..5e453ae0b2653fccc145d3e2ace20d8c042e0f24 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,45 @@ # Brand spanking new Anki Pack -Tell your users something about the pack here. +Hi, do you want to build a new Anki pack? You can start with this repository! + +## First-time setup for a new project +Create a +[new project](https://gitlab.phaidra.org/projects/new?namespace_id=2286#import_project) +in the _Anki Packs_ namespace and choose _Repository by URL_ with this repo: +``` +https://gitlab.phaidra.org/kartenaale/templates/anki-pack.git +``` + +This step will also clone this README. You can change it later to remove this +section and tell your users something about your pack instead. + +Next, enable Gitlab CI for your project. With this feature, your new content +will produce Anki packages on Merge Requests and on the main branch. To enable, +open _Settings_ in the new Gitlab project and expand +_Visibility, project features, permissions_. _CI/CD_ under _Repository_ should +be _enabled_. Customize Merge Requests and other settings to your liking ( +_Pipelines must succeed_ is highly recommended). + +## Importing the pack to your phone +Open the [releases section](-/releases) and click _Browse all APKGS…_. There, +click an APKG, download it, and import into Anki. ## Contributing To add new content to this pack, add subfolders to `content/` with a `.apkg-spec.yaml` file in it, and data in the form of CSV, images or APKGs. -The template contains a simple `My-Anki-Package`. You can remove it or -customize it to your needs. Have a look at the other packs for more examples. +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-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. + +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 +job on the MR and if you are happy, merge to main. ### Releasing a new version Bump the version number in `package.json` and merge the pull request. + +A new release will be created in the [releases section](-/releases) of the +project and the kartenaale whatsapp group will be notified (if you go to the +CI/CD job and link with your Whatsapp to send out the notification - restart +the job if necessary). diff --git a/content/Bijection-from-Images/.apkg-spec.yml b/content/Bijection-from-Images/.apkg-spec.yml new file mode 100644 index 0000000000000000000000000000000000000000..77281978a4f67a4aecac4b403ae290d54be6870b --- /dev/null +++ b/content/Bijection-from-Images/.apkg-spec.yml @@ -0,0 +1,13 @@ +content_version: 2.0.3 + +templates: +- bijective + +content: +- import_images: + content_version: 2024-02-22 19:00:00+00:00 + note_type: Bijection + deck_name_pattern: 'Chinese Hand Gestures' + fields_mapping: + A: 'The color {{from_basename}}' + B: '{{image}}' diff --git a/content/Bijection-from-Images/red.png b/content/Bijection-from-Images/red.png new file mode 100644 index 0000000000000000000000000000000000000000..45963e5fca95e06822eef5da0ac0ece43c2a8c30 Binary files /dev/null and b/content/Bijection-from-Images/red.png differ diff --git a/content/My-Anki-Package/.apkg-spec.yaml b/content/Facts-from-CSV/.apkg-spec.yaml similarity index 100% rename from content/My-Anki-Package/.apkg-spec.yaml rename to content/Facts-from-CSV/.apkg-spec.yaml diff --git a/content/My-Anki-Package/content.csv b/content/Facts-from-CSV/content.csv similarity index 100% rename from content/My-Anki-Package/content.csv rename to content/Facts-from-CSV/content.csv