Skip to content

This script is designed to rename ePub files in folders based on specific criteria. It searches for folders containing ePub files and renames them according to the folder's name.

License

Notifications You must be signed in to change notification settings

Decaded/epub-renamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Epub File Renamer Script

This handy script is here to make renaming ePub files a breeze. It's designed to help you organize your digital book collection by following a specific naming pattern. Let's dive into it!

Features

  • Automatic Renaming: The script renames ePub files based on this naming pattern: [folder name] v[XX].epub, where [XX] is a two-digit volume number.
  • Skip Existing Names: If a folder already follows this naming pattern, it won't be renamed.
  • User-Friendly: Handles cases where it can't detect the volume number and asks for your input. You can also skip renaming in such cases.
  • Informative Messages: The script provides clear and helpful messages during the renaming process.
  • Folder Listing: It lists the folders it finds for processing in a user-friendly bullet point format.

Bash version

  1. Download the Script: Click here to download the script. Place it in the root folder where you have folders with files you want to rename.
  • You can also use wget:
wget https://raw.githubusercontent.com/Decaded/epub-renamer/master/Bash/renamer.sh
  1. Make it Executable: Open your terminal and navigate to the script's folder. Run this command to make the script executable:
chmod +x renamer.sh
  1. Run the Script: Execute the script with:
./renamer.sh

Python version (Linux and Windows)

If you prefer using Python, you can also utilize the script provided in the ./Python folder. Follow the steps below to rename your ePub files using Python:

  1. Download the Python Script: Navigate to the Python folder in the project repository and download the renamer.py file. Or you can use the following commands in your terminal or command prompt:
  • For Linux:
wget https://raw.githubusercontent.com/Decaded/epub-renamer/master/Python/renamer.py
  • For Windows:
curl -O https://raw.githubusercontent.com/Decaded/epub-renamer/master/Python/renamer.py
  1. Run the Python Script: Place it in the root folder where you have folders with files you want to rename. Open your terminal, navigate to the folder where you placed renamer.py, and execute the script using Python 3:
python renamer.py

Alternatively, if you're using Windows, you can execute the script by double-clicking on it.

  1. Follow the Prompts: The Python script will guide you through the renaming process, providing instructions and asking for user input when necessary.
  2. Enjoy the Renamed ePub Files: Sit back and enjoy your organized digital book collection!

⚠️ Note: the Python script offers the same functionality as the Bash script but may be more convenient for users comfortable with Python programming.

Folder Structure

This structure represents how your existing folder structure should be organized for the script to work:

- My ePubs/
  - Light Novel Series/
    - Some Title v01.epub
    - Some Title v02.epub
    - Some Title v03.epub

  - Another Light Novel/
    - Some Title v01.epub
    - Some Title v02.epub
    - Some Title v03.epub

  - Random Folder/
    - Random File.epub

This structure represents how the script works, based on the structure above:

- My ePubs/
  - Light Novel Series/
    - Light Novel Series v01.epub
    - Light Novel Series v02.epub
    - Light Novel Series v03.epub

  - Another Light Novel/
    - Another Light Novel v01.epub
    - Another Light Novel v02.epub
    - Another Light Novel v03.epub

  - Random Folder/
    - Random File.epub # script will ask what to do with this file

Tested on Ubuntu and Windows 11

Please note that this script has been tested on Ubuntu and Windows 11 systems. While it's likely to work on other Linux and Windows distributions, results on other operating systems may vary.

Join the Fun

We're all ears! If you spot something funky or have ideas for making this script even cooler, share it with us via issues.

License

This script is licensed under the MIT License - see the LICENSE file for details.

About

This script is designed to rename ePub files in folders based on specific criteria. It searches for folders containing ePub files and renames them according to the folder's name.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project