Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-01-2015, 07:01 AM   #1
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
[GUI Plugin] Embed Comic Metadata

Embed Comic Metadata
A Calibre Plugin to manage comic metadata in calibre.

Version History
Spoiler:

Version 1.6.6 - 05.04.2023
Added support for tags in comicinfo.xml

Version 1.65 - 23.02.2023
Fixed not reading publication day from metadata

Version 1.64 - 25.09.2022
Fixed a bug in converting cbr to cbz if cbr contains folders

Version 1.63 - 22.09.2022
Fixed a bug in converting cbr to cbz

Version 1.62 - 26.08.2022
Switched to standard python zipfile utility. Fixes bug with accented characters in filenames inside of zipfiles

Version 1.61 - 13.03.2020
Fixed issue if cbr with comments are converted

Version 1.60 - 01.02.2020
Added custom manga column

Version 1.51 - 07.10.2020
Fixed bug during automatic conversion to cbz

Version 1.50 - 15.09.2020
Added calibre 5 compatibility

Version 1.40 - 17.01.2018
Added the ability to read picture size in mega pixels
fixed a bug for non numerical volume values

Version 1.38 - 01.10.2017
Added some more image extensions for counting pages

Version 1.37 - 25.06.2017
Updated for calibre 3.1.1. This calibre version is now also the new minimum Version

Version 1.36 - 15.05.2017
The icon is now themeable

Version 1.35 - 19.04.2017
Added scrollbars to the config menu

Version 1.34 - 12.02.2017
Added support for the page count column
Added the ability to count the pages of a comic by counting the number of image files in it

Version 1.33 - 31.01.2017
Added Number of issues and comic vine link columns
Converting rar and zip to cbz

Version 1.32 - 07.10.2016
Using safe_replace to embed metadata to prevent corruption of cbz files. This makes embedding metadata slower, but safer.

Version 1.31 - 07.04.2016
Fixed a bug if embedding in a cbz file without metadata

Version 1.3 - 06.04.2016
Added options to customize the toolbar menu
Added the possibility of translations
German translation
An option to embed the calibre cover into a comic
Major internal refactoring
Various bug fixes

Version 1.2 - 019.09.2015
Major update:
Allow importing and embedding to custom columns.

Version 1.1.1 - 019.09.2015
Fixed issue with last version.

Version 1.1.1 - 019.09.2015
Fixed importing of unicode fractionals as issue number

Version 1.1 - 019.09.2015
Added the ability to import metadata from comic archives into calibre

Version 1.0.1 - 01.09.2015
Setting the language metadata is now handled by calibres localization functions

Version 1.0 - 01.09.2015
Initial release


Special Notes
Requires calibre version 3.1.1 or later.

Main Features
- Can embed the metadata to the zip comment or a ComicInfo.xml file inside the archives
- Can read the above metadata formats and import them into calibre
- Can write many additional metadata into custom columns Can automatically convert cbr/zip/rar files to cbz
- Can embed the calibre cover into cbz comics (experimental)
- Can count the number of pages (image files) in a comic
- Can get the size of the images in the comic file

Usage

To embed calibres metadata into the comic archive
  • Select the comics that should be updated in the library.
  • Click the addon EmbedComicMetadata icon in your toolbar
  • (You can select a specific action or open the configuration bei clicking on the small arrow on the icon and selecting the desired option)

To import the comic archive metadata into calibre
  • Select the comics that should be updated in the library.
  • Click the small arrow on the addon EmbedComicMetadata icon in your toolbar
  • Click on "Import Metadata from the comic archive into calibre"

Custom Columns
You can make custom columns in calibre and populate them with metadata imported with the plugin.
In the configuration use the dropdown menu for the columns to select what metadata should be written to what custom column.

The custom columns you make in calibre should be of the following type, depending on the metadata stored in them:

Comma seperated text, like tags, shown in the tag browser with "Contains names" checked:
  • Penciller, Inker, Colorist, Letterer, Cover Artist, Editor
Comma seperated text, like tags, shown in the tag browser:
  • Characters, Teams, Locations, Genre
Text, column shown in the tag browser:
  • Story Arc, Volume, Number of Issues
Integer:
  • Volume, Number of Issues
Series like:
  • Story Arc
Text, but with a fixed set of permitted values:
  • Manga:
    • Values: No,Yes,YesAndRightToLeft
    • Default Value: No
Comment:
  • Comic Vine Link

Customizing the main menu
The menu in the toolbar can be customized to your liking through the options in the configuration.

Embed Cover
Use with care, just inserts the calibre cover as "00000000_cover" into the comic archive (previously inserted calibre covers are overwritten).

Configuration
  • 'Write metadata in zip comment': This format is used by calibre, if you import comic files and by ComicbookLovers (default: on)
  • 'Write metadata in ComicInfo.xml': This format is used by ComicRack and some other comic readers (default: on)
  • 'Auto convert cbr to cbz': If a comic has only the cbr format, convert it to store the metadata (default: on)
  • 'Also convert rar and zip to cbz': Expand the behaviour for cbr to rars and zips (default: off)
  • 'Auto convert while importing to calibre': As above, but even when importing metadata into calibre (default: off)
  • 'Delete cbr after conversion': Deletes the cbr format after the conversion (default: off)
  • 'Swap names to "LN, FN" when importing metadata': Does just what it says
  • 'Auto count pages if importing': Count pages automatically if importing metadata into calibre (default: off)
  • 'Main Button Action': You can set, what action should be performed if the big toolbar button is pressed. Needs a calibre restart (default: Embed metadata)
  • 'Menu Buttons': The dropdown menu on the icon in the toolbar can be custimized to your liking through these options

Older Versions
Older versions for calibre 2 can be found on the github page of the plugin:
https://github.com/dickloraine/Embed...adata/releases

Acknowledgement
The handling of the comic metadata is done by using code from ComicTagger
Attached Files
File Type: zip EmbedComicMetadata.zip (42.5 KB, 28960 views)

Last edited by dickloraine; 04-05-2023 at 03:26 PM. Reason: Version 1.6.6
dickloraine is offline   Reply With Quote
Old 09-06-2015, 01:15 AM   #2
DreamStatic
Enthusiast
DreamStatic began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Aug 2014
Device: iphone, ipad, computer
Thanks for this awesome plugin. I am curious what your current workflow is to get your comics into Calibre? Do you have any plugins that will pull the info down from ComicVine?
DreamStatic is offline   Reply With Quote
Advert
Old 09-06-2015, 08:25 AM   #3
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
Currently I still use ComicTagger and then import to calibre (calibre imports metadata stored in the zip comment. To be compatible with the comictagger metadata you need to change the options in calibres comic metadata reader plugin to "issue"). But I make sometimes changes in calibre or add webcomics or add the metadata manually (which is a pain in comictagger). In these cases I needed a method to save the metadata in calibre.

There was a comicvine plugin for calibre: https://www.mobileread.com/forums/sho...ght=comic+vine There is a fix somewhere in the thread, but I didn't test it yet. Maybe I change to that, if it works. But comictagger has some advantages, such as comparing the cover to get acurate metadata.

Last edited by dickloraine; 09-06-2015 at 08:28 AM.
dickloraine is offline   Reply With Quote
Old 09-06-2015, 11:29 AM   #4
DreamStatic
Enthusiast
DreamStatic began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Aug 2014
Device: iphone, ipad, computer
Very cool. Thanks again for the plugin and the info about your workflow. Keep up the good work.
DreamStatic is offline   Reply With Quote
Old 09-16-2015, 03:07 AM   #5
DreamStatic
Enthusiast
DreamStatic began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Aug 2014
Device: iphone, ipad, computer
Really enjoying this plugin. Thanks again.

Any thoughts on writing a plugin that will read ComicInfo.xml files that reside in the book directory?
DreamStatic is offline   Reply With Quote
Advert
Old 09-16-2015, 07:47 AM   #6
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
Do you mean a plugin that reads the metadata from the comicinfo.xml instead/in addition of the zip comment? Or something else?

It would be easy to add that as an option to the plugin, I think. Better of course would be a seperate plugin, that does this, when a comic is added. Since I first use comictagger, my files have always both, but I can see, that it could be usefull.
dickloraine is offline   Reply With Quote
Old 09-16-2015, 12:24 PM   #7
DreamStatic
Enthusiast
DreamStatic began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Aug 2014
Device: iphone, ipad, computer
Yes, the thought would be to have either one that reads comicinfo.xml when adding the files, and/or the option in this plugin to update the data from either the zip comment or comicinfo.xml. That way if I update the data outside Calibre, it would be easy to pull in those updates thru your plugin.

I would love to be able to utilize the additional items Comicrack includes such as Penciller, Writer, Cover Artist, etc. either to custom fields or just concatenate them all into the Comments. So from this point of view, be super cool to have a GUI that would show all fields I have available in Calibre, and then a way to map the nodes of the xml to each of these fields. With additional ability to add text and nodes together. So I could build a title from <series>Army of Darkness</series> + " #" + <seriesNumber>1</seriesNumber> + " - " + <title>Release the Kraken</title> which would then load Army of Darkness #1 - Release the Kraken to the Title field in Calibre.

Just trying to think out loud and save me from having to retag all my comics down the road. I would like to figure out a way to do right the first time.

I can do some of this thru the Importlist plugin, but it isn't really built for this and can only do one file manually at a time, so it is very time consuming. And it doesn't have the ability to add nodes with text to build custom results which I believe will be the killer feature. Here is the post I added to the Importlist plugin topic: Go there

Last edited by DreamStatic; 09-16-2015 at 12:30 PM.
DreamStatic is offline   Reply With Quote
Old 09-16-2015, 07:01 PM   #8
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
I have begun to implement reading metadata from the comic file, but only a first workflow. I think I can include this relatively easy.

Expanding that to read more than the standart calibre metadata would be possible. What needed to be done in addition is making an option menu, where the user could enter the names of his custom columns for that extra infos and just expanding the function that maps comictagger metadata to calibre metadata with the additional fields.
I don't know if I myself will do this. I haven't worked with custom columns in the code yet and it would be some work to write the gui and map all the additional infos.

The project is on github (the version there is a little bit different to the live plugin, since I have tinkered with it since the last real version). I develop the read feature currently in the " read_cix_metadata" branch.
dickloraine is offline   Reply With Quote
Old 09-16-2015, 08:21 PM   #9
DreamStatic
Enthusiast
DreamStatic began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Aug 2014
Device: iphone, ipad, computer
Wow!! I appreciate you taking the time to implement this idea. I tried to download the project from github to give it a go but ran into an error.

calibre, version 2.38.0
ERROR: Unhandled exception: <b>InvalidPlugin</b>:The plugin in u'/Path/to/Plugin/EmbedComicMetadata-read_cix_metadata.zip' is invalid. It does not contain a top-level __init__.py file


Sorry if I jumped the gun and it isn't ready just yet. Thanks again.
DreamStatic is offline   Reply With Quote
Old 09-16-2015, 10:35 PM   #10
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
It is not ready yet
The newest version should at least run, but has only some fields ready to test. If you download the zip from the development branch, github seems to put the content into a folder inside the zip file. Just unzip the folder and zip only the content.
dickloraine is offline   Reply With Quote
Old 09-16-2015, 10:39 PM   #11
DreamStatic
Enthusiast
DreamStatic began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Aug 2014
Device: iphone, ipad, computer
Cool, no worries. I will wait until it is ready for testing. Thanks again. Just jumping the gun due to my excitement.
DreamStatic is offline   Reply With Quote
Old 09-17-2015, 11:49 AM   #12
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
Okay, the code in the "read_cix_metadata" branch should now work. It needs some testing and reading from cbr is disabled for now, since I don't have a file to test it (but converting it on the fly to cbz of course works).
Before I include the changes here, it will need a bit of testing and I think I simplify the dropdown ui (with an option to have all commands). So it will take a couple of days (depending on how much time I find).
dickloraine is offline   Reply With Quote
Old 09-17-2015, 01:56 PM   #13
DreamStatic
Enthusiast
DreamStatic began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Aug 2014
Device: iphone, ipad, computer
Wow you are pretty awesome!! At first I thought it wasn't working since Calibre doesn't auto update until you click to another row. VERY IMPRESSED with how quickly you implemented this. You code for a living?
DreamStatic is offline   Reply With Quote
Old 09-18-2015, 09:04 AM   #14
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
No, I don't. This plugin is not that difficult to write. I use code from comictagger for transforming the metadata and calibre provides functions for most of the other needs. So it is mostly just: If this do that.
dickloraine is offline   Reply With Quote
Old 09-20-2015, 05:14 PM   #15
DreamStatic
Enthusiast
DreamStatic began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Aug 2014
Device: iphone, ipad, computer
Liking where you are headed with this branch. Nice work. You decided if you are going to implement Custom Column mapping? i.e. Cover Artist to custom column Cover Artist, Imprint to custom column Imprint.

I noticed the Count Pages and Import List plugins utilize the Custom Columns, maybe they will be of help if you decide to implement this mapping feature. I looked at them to see if I could decipher custom columns, but I haven't had any luck yet.
DreamStatic is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Zotero Metadata Importer DaltonST Plugins 291 08-07-2023 01:38 PM
[GUI Plugin] Comicalibre - Comic Vine metadata processor Pewsplosions Plugins 1 12-18-2022 10:16 AM
[GUI Plugin] Clean Metadata WS64 Plugins 28 01-06-2022 09:09 PM
Call fetch/download metadata from GUI plugin BeckyEbook Development 0 02-03-2017 07:51 PM
Getting custom metadata field in GUI plugin SauliusP. Development 7 02-11-2012 02:31 AM


All times are GMT -4. The time now is 11:41 PM.


MobileRead.com is a privately owned, operated and funded community.