Username/Email: Password:

Can I share this Python script here?

You must be registered to post!
From User
Message Body
user avatar

7:24 pm, May 7 2022
Posts: 5

A couple years ago, I had my manga in folders like everyone else. However, the romaji titles mean nothing to me and I can't remember what every manga was about. I got tired of looking up the titles in order to see the cover and read the synopsis.

I was already using Calibre for my eBooks, so I decided to try using it for my manga as well.

The problem is that Calibre only accepts 1 file per title (not a folder of images like manga comes in) and getting good metadata for manga is pretty much impossible.

Therefore, I wrote a Python script that will make it easy to get metadata from MangaUpdates and then add your manga to Calibre. The script is not fully-automated, the user needs to provide a MangaUpdates URL, but here's the process in a nut-shell...

1) Takes input manga folder(s)
2) Waits for a MangaUpdates Series Page URL (It'll open your browser with a web search for '{folder_name} mangaupdates', all you need to do is locate the right page and copy the URL)
3) Once a URL has been coppied, the series page will be scanned for metadata
4) Saves that metadata as ComicInfo.xml alongside the manga folder
5) Compresses the .xml + manga folder into a single '{title}.cbz' file

That .cbz can then be added to Calibre and the metadata extracted from it using a Calibre plugin.

The end result is pretty nice; Cover image, synopsis, genres, MangaUpdates URL, as well as other info if available. Here's a screenshots of my library, which has been populated using this script: Calibre Library

The script works great, I've processed a lot of series and never had issues. Again, it's not fully automated, you will need to locate and copy the MangaUpdates URL. Once the script outputs the .cbz, you'll then need to drop it into Calibre where the embedded .xml file will be read for metadata.

I don't actually read the manga in Calibre, the viewer sucks, but it is great for organization and finding something interesting if you have a large library. You can either open the folder containing the .cbz and go from there, or use a Calibre plugin called "Open With" to open the .cbz in another program.

I was thinking about sharing the script with the MU community, since I'm sure there's someone else on here that would like a nice manga library. However, before I do I'd like to request permission from the staff to make sure it's okay and that I'm not breaking any rules.

I'll only be providing the source code and simple setup instructions, no compiled release or anything.

Last edited by WIRLYWIRLYPOOL at 11:38 am, May 8 2022

user avatar

7:41 pm, May 7 2022
Posts: 18

Oh thats really cool


2:48 am, Sep 13 2022
Posts: 1

I've been looking for something exactly like this. Yeah, I do wish it was automatic. Something like being using the exported txt files from the list, but seeing how I can't find anything close to this I'll be happy using this script

You must be registered to post!