Skip to content

Commit

Permalink
Document usage in README
Browse files Browse the repository at this point in the history
  • Loading branch information
mamachanko committed Oct 25, 2020
1 parent 4229a25 commit c00fd4c
Showing 1 changed file with 28 additions and 33 deletions.
61 changes: 28 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,67 @@
# Ankify 📝 → 🗃

> Create [Anki](https://apps.ankiweb.net) decks from Markdown notes
> Create [Anki](https://apps.ankiweb.net) decks from Markdown notes
Let's say you've reading a book about command line tools and took these notes:
Let's say you've been reading a book about command line tools and took these
notes:
```
# Command line tools
---
title: My Notes
---
1. _How to exit Vim_
`:wq`, `:x` or `ZZ`
# How to exit Vim
1. _Cool tools_
`:wq`, `:x` or `ZZ`
# Cool tools
* xargs
* awk
```

Ankify will write a deck to `notes.apkg` called _My Notes_ with two cards:
Ankify will create a deck called _My Notes_ with two cards:
| Front | Back |
|-------|------|
| How to exit Vim|`:wq`, `:x` or `ZZ`|
| Cool tools | <ul><li>xargs</li><li>awk</li></ul> |

Now you can import `notes.apkg` into Anki.
You can import this deck into Anki.

## Installation & usage

> ⚠️ this is work-in-progress. none of these work ... yet. stay tuned. 🦺
### On the command-line

### As a Python module
```
$ pip install ankify
$ python
>>> import ankify
>>> ankify.ankify('notes.md', 'notes.apkg')
```
* Read from stdin:
```
$ cat notes.md | python ankify.py > notes.apkg
```

### On the command-line
```
$ pip install ankify
$ cat notes | python -m ankify > notes.apk
```
* Provide a filename:
```
$ python ankify.py notes.md
```

### Using docker

```
$ cat notes | docker run -i mamachanko/ankify > notes.apkg
```

### Using the API
```
$ curl --method POST --data @notes.md --output notes.apkg --url https://ankify.io
$ cat notes.md | docker run -i mamachanko/ankify > notes.apkg
```

## todos
* [x] fix markdown rendering
* [x] validate that reading from stdin amd writing to stdout works with docker run
* [x] investigate what the workflow of updating cards and re-importing a deck
would look like
* [] return stabel guids for notes (see [here](https://github.com/kerrickstaley/genanki#note-guids))
* [] set card number
* [x] read from stdin
* [x] write to stdout
* [x] refactor to classes
* [] build docker image
* [] publish image
* [x] build docker image
* [x] publish image
* [] return stable guids for notes (see [here](https://github.com/kerrickstaley/genanki#note-guids))
* [] set card number
* [] automate docker image building and publishing
* [] create ankify website
* [] break out ankify.py, docker and web repositories
* [] create web API
* [] get domain
* [] publish module to pypi
* [] make module invokeable through 'python -m ankify'
* [] create ankify org

0 comments on commit c00fd4c

Please sign in to comment.