testownik2anki 0.2.0

CLI tool to convert Testownik to Anki format
docs.rs failed to build testownik2anki-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

testownik2anki

Simple CLI app writen in Rust which converts Testownik files into Anki one.

Installation

Linux

Fedora (.rpm)

  1. Go to Releases page
  2. Click testownik2anki.rpm in Packages asset to download

Debian (.deb) (untested)

  1. Go to Releases page
  2. Click testownik2anki.deb in Packages asset to download

Other (untested)

  1. Go to Releases page
  2. Click testownik2anki in Other assets to download

Windows (untested)

  1. Go to Releases page
  2. Click testownik2anki.exe in Other assets to download

Build from source

# Copy and unpack repo
curl -L https://gitlab.com/testownik2anki/testownik2anki/-/archive/main/testownik2anki-main.tar.gz | tar -xz 

# Go to directory with executable file
cd testownik2anki-main/target/release

# Make it executable
sudo chmod +x testownik2anki
# Copy repo
Invoke-WebRequest -Uri "https://gitlab.com/testownik2anki/testownik2anki/-/archive/main/testownik2anki-main.zip" -OutFile "testownik2anki-main.zip"

# Unzip repo
Expand-Archive -Path "testownik2anki-main.zip" -DestinationPath .

# Go to directory with executable file
cd .\testownik2anki-main\target\release\

How to use

for usage run:

man testownik2anki

Run inside testownik directory

testownik2anki

Run the app elsewhere

testownik2anki '/path/to/Testownik directory' 

for usage run:

./testownik2anki --help

Run inside testownik directory

./testownik2anki

Run the app elsewhere

./testownik2anki '/path/to/Testownik directory' 

for usage run:

testownik2anki.exe --help

Run inside testownik directory

testownik2anki.exe

Run the app elsewhere

testownik2anki.exe "C:\path\to\Testownik directory"

How it works

The app will convert all .txt files from Testownik format into one Anki.txt file which can be later imported to Anki via "Import" option (See wiki).

Directory structure

Before running

Testownik directory
├── 1.txt
├── 2.txt
├── 2.png
├── 3.txt
└── ...

After running

Testownik directory
├── Imported to Anki
   ├── Anki.txt
   └── Errors
       ├── Above 5 answers
       │   └── 1.txt
       └── Files with photos
           ├── 2.txt
           └── 2.png
├── 1.txt
├── 2.txt
├── 2.png
├── 3.txt
└── ...

Where 1.txt has more than 5 answers and 2.txt has photo inside


Errors

There are 2 limitations in current app:

More than 5 answers

This is limitation of Multiple Choice for Anki add-on which can handle only 5 answers.
The simpliest solution would be to delete false answers or merge some of them

File with Photos

You cannot import photo via importer in Anki.
You will need to add them manually after importing Anki.txt


Other issues

There are problems with mathjax on AnkiDroid because of Multiple Choice for Anki add-on. If you wish to use Anki on phone don't use mathjax.
I will try to fix the extension but I don't know if it's even possible and I have no idea how to try to fix it

Help

For more information check wiki.
If you found bug, please open issue