Skip to content

scharnkn/rename-ebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

EPUB Renamer

A Python tool that automatically renames EPUB files based on their metadata. The script extracts information such as author, title, publication year, and publisher from the EPUB metadata and renames the files to a standardized format:

AUTHOR - TITLE (YEAR, PUBLISHER).epub

If no publisher information is available, the format is reduced to AUTHOR - TITLE (YEAR).epub.

Dependencies

  • Python 3.6+
  • ebooklib
  • python-dateutil

Usage

Basic Usage

python rename_ebook.py my_ebook.epub

Rename Multiple Files

python rename_ebook.py ebook1.epub ebook2.epub ebook3.epub

Using Globbing Patterns

python rename_ebook.py "ebooks/*.epub"

Dry-Run Mode (no actual changes)

python rename_ebook.py --dry-run my_ebooks/*.epub

or shorter:

python rename_ebook.py -d my_ebooks/*.epub

Notes

  • The script creates a backup of the original file with the ".old" extension
  • No changes are made if the target file already exists

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages