Skip to content

Tool for converting CSV files from Midori into APKG decks.

License

Notifications You must be signed in to change notification settings

StefanGreve/midorianki

Repository files navigation

MidoriAnki

This project is a CLI that converts CSV files from Midori into Anki APKG decks. You can also use your own CSV files as long they follow the kanji,kana,meaning convention mandated by the midorianki application.

Screenshot

Screenshot

Setup

Follow along the setup guide below to install this terminal application. Using a virtual environment is optional, but recommended. See also requirements/*.txt to examine the dependency graph.

Installation

pipx is the recommended way to install Python applications in an isolated environment:

pipx install git+https://github.com/StefanGreve/midorianki.git

Fire up a debug build in ./venv:

git clone https://github.com/StefanGreve/midorianki.git
cd weather/
python -m venv venv/
source venv/bin/activate
pip install -r requirements/development.txt
pip install -e .

Basic Usage

Command Line Usage

Get help:

midorianki --help

Create a new Anki deck:

midorianki convert --file <csv> [--name <string>|--dest <path>]

The deck name defaults to csv's file stem if --name is not specified. The default target directory is always the current working directory.

Example

curl https://gist.githubusercontent.com/StefanGreve/5d8d3111eb4e29bbce691f6ef2ebb656/raw/4a8b081086fa4174b64c6f86be33fb07fa36590f/kaze-no-uta-wo-kike.csv --output test.csv
# creates a deck_title.apkg file in the home directory
midorianki convert --file ./test.csv --name "deck_title" --dest $HOME