Just get the OCR from a book hosted at the Kramerius site. Experimental, Kramerius doesn't work half of the time 😿
- pip install -r requirements.txt
- Rename .env-example to .env
- Put in your cookie from Kramerius (works without it, but with it you can download dila nedostupná na trhu).
- Log into ndk.cz with your account (for example university account)
- Press right click on the page>Inspect
- In the inspect window, select Storage
- Select cookies
- Copy the shibsession name into cookie name in env.
- Copy the Value of shibsession into cookie Value in env.
- Save
I don't know how long the cookie persist. Needs more testing
- Download the Kramerius.py
- Make it exacutable with chmod +x Kramerius.py
- Run ./Kramerius.py "Link to your book"

You can specify the output file with --o flag
IF your download fails (kramerius is tricky) you get uuid returned on which it failed. Then, you can simply run ./Kramerius "link" --c "uuid" and it will continue the download into output_continueation.txt. Then run cat output_continuation.txt>>output.txt to join them.
That's it! Download what you need :)
- -> ndk.cz
- -> Moravská zemská knihovna
- -> kramerius.lib.cas.cz
If you have gTTS downloaded (pip install gTTS), you can use the TTS.py to generate "quick" audiobook for your file.
- Simply call TTS.py "nameofyourfile.txt" and in a few minutes (takes some time) you will have a listenable file.
LMK if anything breaks