bell notificationshomepageloginedit profileclubsdmBox

10% popularity   0 Reactions

I wrote a small python script to do that.
pip install epub
Install the epub library and run the below script with a sibling directory containing all your epub files to be renamed.
import os
import glob
import epub

dirName = "books" #the folder containing your epub files, should be in the
#directory which contains the script.

for File in glob.glob(dirName + "*.epub"):
with epub.open_epub(File) as book:
title = book.opf.metadata.titles[0][0]

os.rename(File, dirName + "" + title + ".epub")

Note : The title should not be too long (not exceeding your os' filename limit).


Free books android app tbrJar TBR JAR Read Free books online gutenberg


Load Full (0)

Login to follow story

More posts by @Nuzhat

0 Comments

Sorted by latest first Latest Oldest Best

 

Back to top