Tenma icon indicating copy to clipboard operation
Tenma copied to clipboard

Read "comicinfo.xml" data

Open theotocopulitos opened this issue 6 years ago • 9 comments

Many programs allow to embed comic-vine donwloaded info into the cbz archives, using a "comicinfo.xml" file. It would be great if Tenma was able to find out if the archive includes the "comicinfo.xml" file already and read the metadata from it, instead of connecting and downloading from comicvine.

This would have in my opinion two advantages:

  1. Would reduce the number of hits to the comicvine site
  2. Would make sure that comics already tagged are matched and the metadata is correct.

theotocopulitos avatar Jul 30 '17 20:07 theotocopulitos

This is is definitely something I've thought about. It would greatly improve the matching process when getting metadata.

Would you want the ability for Tenma to create and/or update these XML files as well?

hmhrex avatar Jul 31 '17 13:07 hmhrex

Reading would be great... writting would be just awesome!

theotocopulitos avatar Jul 31 '17 20:07 theotocopulitos

I would start with reading as alot of people use comicrack to already tweak whatever info they want in the comicinfo.xml file. Down the road if you could add writing and make this a full web replacement for comicrack you would be a king :) I would make a settings option for writing though if you put it in. you wouldnt want to overwrite someones already scrapped comicinfo.xml that would be bad.

Also awesome job on Tenma so far. Im really impressed and hope development continues on it. Way better than anything else I have tried so far.

ianc125 avatar Aug 28 '17 06:08 ianc125

@ianc125 Thanks for those notes. I'll keep those in mind when I'm working on this part.

hmhrex avatar Aug 28 '17 12:08 hmhrex

Someone just linked me this project. Over the past couple months I've been working on the same thing basically lol

Still quite bare bones compared to yours, and my project structure is pretty wonky. I'm working on overhauling that now, first project ever really, so learning as I go.

However, I do currently have code for extracting and then reading out the ComicInfo.xml in my project already, and I was hoping to add comicvine integration to my app as well.

Perhaps you'd like to borrow my code, as I'm definitely going to be looking at your comicvine integration for some inspiration.

https://github.com/hubbcaps/gazee/blob/4d36bac0754696871cb166c6810597c54fc8cc65/gazee/comicscan.py#L171

The first part of this function assumes you already have the comic extracted by an earlier function in the file and then it looks for the file in that path passed to it. You can see how I use xmltodict to easily parse the file for simple info at the moment in the first pass for information. You can easily expand this to include the additional fields you already support via ComicVine.

hubbcaps avatar Sep 19 '17 21:09 hubbcaps

I'm about half-way through implementing this. I've just got to clean things up a bit, and then add back the functionality to query CV for the information for files without the ComicInfo.xml (since I had to perform quite a bit of surgery on the current comicimport.py file.)

bpepple avatar Nov 05 '17 17:11 bpepple

@bpepple Any updates on this feature? This is pretty high on my personal priority list, but I'd hate to start something if you've made significant progress already.

trumblejoe avatar Jun 04 '18 03:06 trumblejoe

@trumblejoe: I ended up creating my own version based on Tenma (tho technically it's not a fork) which you can use until Tenma comes back from hiatus and adds the functionality:

https://github.com/bpepple/bamf

bpepple avatar Jun 04 '18 12:06 bpepple