Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/archenoth/clj-anki
An Anki library to read and write .anki2 and .apkg files in Clojure
https://github.com/archenoth/clj-anki
anki anki-packages
Last synced: 22 days ago
JSON representation
An Anki library to read and write .anki2 and .apkg files in Clojure
- Host: GitHub
- URL: https://github.com/archenoth/clj-anki
- Owner: Archenoth
- License: epl-1.0
- Created: 2016-12-17T05:53:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-09T18:55:23.000Z (over 1 year ago)
- Last Synced: 2024-10-14T07:41:45.187Z (22 days ago)
- Topics: anki, anki-packages
- Language: Clojure
- Homepage:
- Size: 36.1 KB
- Stars: 31
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# clj-anki
A Clojure library designed to allow programmatic interaction
with [Anki](http://ankisrs.net/) packages.[![Build Status](https://github.com/Archenoth/clj-anki/actions/workflows/clojure.yml/badge.svg)](https://github.com/Archenoth/clj-anki/actions/workflows/clojure.yml)
[![Clojars Project](https://img.shields.io/clojars/v/clj-anki.svg)](https://clojars.org/clj-anki)deps.edn
```clojure
clj-anki {:mvn/version "0.0.4"}
```Leiningen/Boot
```clojure
[clj-anki "0.0.4"]
```Gradle
```
compile "clj-anki:clj-anki:0.0.4"
```Maven
```xml
clj-anki
clj-anki
0.0.4```
## Usage
After including this library
```clojure
(require '[clj-anki.core :as anki])
```You can write questions, answers, and tags to Anki packages. For
example, to write some math questions with the tag "`math`" to a file
called "`math.apkg`", you could:```clojure
(let [cards ["3 + 4" "7"
"4 + 5" "9"]
(anki/notes-to-package! cards "math.apkg"))
```The resulting package you can import into Anki.
You can also read notes from Anki packages:
```clojure
(anki/read-notes "math.apkg")
```Which after the above returns:
```clojure
({:question "4 + 5", :answers ["9"], :tags #{"math"}}
{:question "3 + 4", :answers ["7"], :tags #{"math"}})
```*Slightly* more in-depth documentation can be
found [here](doc/intro.md).## License
Copyright © 2016-2017 Archenoth
Distributed under the Eclipse Public License version 1.0