Skip to content

itsupera/furiganalyse

Repository files navigation

Buy Me A Coffee donate button

Furiganalyse

Annotate Japanese ebooks with furigana, and other conversions.

→ Try it here!


Supported input formats:

  • EPUB
  • AZW3 (without DRM)
  • MOBI

Supported output formats:

  • EPUB
  • AZW3 (without DRM)
  • MOBI
  • Many text files (one per book part)
  • Single text file
  • Anki Deck (each sentence as a card)
  • HTML (readable in web browser)

Setup and run

Using Docker to create a container with all the dependencies and dictionaries (tested on Ubuntu 24.04):

docker compose build

Or grab the latest prebuilt image:

docker pull itsupera/furiganalyse:latest
docker tag itsupera/furiganalyse:latest furiganalyse:latest

Run as a web app

docker compose up -d

Then open http://127.0.0.1:5000 in your web browser

Run as a CLI

# Run this from the directory your ebook (for example "book.epub") is in
docker run -v $PWD:/workspace --entrypoint=python3 furiganalyse:latest \
    -m furiganalyse /workspace/book.epub /workspace/book_with_furigana.epub

Calling the API

# Submit a job
curl -v -XPOST http://127.0.0.1/submit \
    -F "file=@<path-to-your-epub>" \
    -F furigana_mode="add" \
    -F writing_mode="horizontal-tb" \
    -F of="epub" \
    -F redirect=false

# Response will look like this:
# {"uid":"<job-id>"}

# Check the status of the job
curl -v http://127.0.0.1/jobs/<job-id>/status
# Response will look like this:
# {
#   "uid": "<job-id>",
#   "status": "complete",
#   "result": "(...data...)"
# }

# Download the result
curl http://127.0.0.1/jobs/<job-id>/file -o output.epub

Local development setup

Install python and poetry, (optionally) create a virtual environment, and install the dependencies:

poetry install