Skip to content

Restore original eBook filenames made gibberish by Calibre.

Notifications You must be signed in to change notification settings

funai/calibre-rename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

calibre-rename

First, install dependency.

poetry install --no-dev

Then you are ready to go.

$ poetry run calibre-rename --help

Usage: calibre-rename [OPTIONS] [PATHS]...

Options:
  -p, --author-prefix TEXT  Prefix for author(s). Default: " - ".
  -e, --epub                Also rename `.epub`.
  -k, --kepub               Also rename `.kepub` and `.kepub.epub`.
  -z, --zipfile             Also rename `.zip` and `.cbz`.
  -o, --opf                 Also rename `metadata.opf`.
  -g, --get-cover           Get cover image from Amazon.
  --help                    Show this message and exit.

Description

When you add a book to Calibre, it will automatically change the filename to one that uses only ASCII characters.

If the original filename uses non-alphanumeric characters, such as CJK, Calibre renames the file to ASCII based on the pronunciation of the string.

However, the reading of the original language is not accurate, and the converted file name is often unintelligible as a result.

This script reads metadata from azw3 files and reverts their filenames to the original language (like Japanese).

If there are epub, kepub, or zip format files with the same basename (just different extensions), you can rename them simultaneously.

A book title may be truncated to keep the filename (including ASIN, authors, and extension) under appx. 240bytes (to prevent OSError).

Note that Calibre insists on its way of naming files. So files renamed with this script are no longer under control by Calibre. However, you can always add them back to the app (and manage them again with gibberish filenames) if you want to.

About

Restore original eBook filenames made gibberish by Calibre.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages