furigana4epub
A Python script to add/remove furigana for Japanese epub books. Using Mecab and Unidic.
ある日の放課後だった。
ある日(ひ)の放課(ほうか)後(ご)だった。
Should work with Python3.6 or higher, but only tested with Python 3.7.5
Install
pip install furigana4epub
If you want to use the full version of UniDic, read this article.
Usage
To add furigana:
furigana4epub target.epub
To remove furigana:
furigana4epub -d target.epub
furigana4epub -h
usage: furigana4epub [-h] [-e EXTENSION] [-r] [-s SUFFIX] [-d] [-b] [-p]
paths [paths ...]
A Python script to add/remove furigana for Japanese epub books. Using Mecab
and Unidic.
positional arguments:
paths Paths of Japanese epub books,can be file names or file
folders
optional arguments:
-h, --help show this help message and exit
-e EXTENSION, --extension EXTENSION
File extension to filter by(default:.epub)
-r, --recursive Search through subfolders
-s SUFFIX, --suffix SUFFIX
suffix of the converted file(default:"_furigana" for
adding or "_no_furigana" for removing furiganas)
-d, --remove remove furigana from epub file
-b, --blod Covert <ruby> dot to html <b> tag before adding
furigana
-p, --rp Do not add ruby <rp> tag to provide fall-back
parentheses for browsers that do not support display
of ruby annotations.Result a smaller output but with
less compatibility.
A note for Kindle
If you are using Calibre for ebook conversion, choose azw3(KF8) output format.
Calibre's mobi output format wouldn't support <ruby> tag.
Credits
This script is inspired by WebNovelCrawler, pinyin2epub ,have some codes from them.
Metadata
Release files for furigana4epub 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| furigana4epub-1.0.2.tar.gz | 7.7 kB | Without provenance | Details for furigana4epub-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| furigana4epub-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for furigana4epub-1.0.2-py3-none-any.whl |
Total release size: 15.8 kB
Release files / furigana4epub-1.0.2.tar.gz
| Download URL | furigana4epub-1.0.2.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ece180ca828e4ab1c17231dc91978535ff4936d79f62e21b0551537a266f34b
|
|
BLAKE2b-256 checksum How to use checksums |
c66aba126888b88cab7c243508e5807d0dbecb68e33295bb90359c0ed1f1193f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Release files / furigana4epub-1.0.2-py3-none-any.whl
| Download URL | furigana4epub-1.0.2-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57d9d4fb290ce687270f955c292249be131e0283c03dad84cc6409c7ecbe1e2e
|
|
BLAKE2b-256 checksum How to use checksums |
bbce3a2dcc62473f5a4e76643ec8ae7832aa6f90841a53f4960737cf599d4eae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Security for furigana4epub 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.