Skip to content
/ oraki Public

Search Russian words on OpenRussian and create Anki decks with the results.

Notifications You must be signed in to change notification settings

chedieck/oraki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oraki

Search queries on OpenRussian and create an Anki deck with the results.

Usage

After installing the program, running for example:

$ oraki нежны

will output something like:

┌────────────────────────────────────────┐
│                 не́жный                 │
│                 tender                 │
│ (delicate, loving, affectionate, fond) │
│────────────────────────────────────────│
│               adjective                │
│              adverb не́жно              │
│  somewhat often used word (top 3,000)  │
└────────────────────────────────────────┘

Сча́стье - не́жный цвето́к.
Happiness is a delicate flower.

You can search in english too:

$ oraki knife

will output:

┌──────────────────────────────────────┐
│                 нож                  │
│                knife                 │
│ (table-knife, penknife, clasp-knife) │
│──────────────────────────────────────│
│      noun, masculine, inanimate      │
│ somewhat often used word (top 2,000) │
└──────────────────────────────────────┘

Ле́звие э́того ножа́ очень о́строе.
The knife has a keen blade.

Every search is saved so that later you can create a Anki deck with them. For that reason, you can also run oraki on a list of words with oraki -f path/to/file. An example of such a file is available at extra/example.list.

Anki

Every search you make is saved on $HOME/.local/share/oraki/main.csv. This file can then be parsed by oraki to create an anki deck by running oraki --compile, or simply oraki -c. Here is the example of a card:

Front:

Back:

Things to notice:

  • The card "question" is the result of the search + the russian phrase if it exists;
  • The answer in the back has the word with the stressed syllable marker right before the search query (in parenthesis)

The deck then is saved on ~/.local/share/oraki/output.apkg and can simply be imported to anki. Every time you do that, old cards will mantain their data, new ones will be added.

Configuration

There is a CSS file at extra/style.css, you can customize it together with the HTML constants Q_FORMAT and A_FORMAT at src/anki.rs, to change the cards style, and update it with make install.

Installing:

git clone https://github.com/chedieck/oraki.git
cd oraki
make install

Requires cargo.

TODO

  • Create function to do many queries from a file
  • Get context phrase when not provided and it exists
  • Remove support for custom phrase

About

Search Russian words on OpenRussian and create Anki decks with the results.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published