Tenma-Server / Tenma

Comic book server with in-browser reader
MIT License
252 stars 31 forks source link

Read "comicinfo.xml" data #32

Open theotocopulitos opened 7 years ago

theotocopulitos commented 7 years ago

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.

hmhrex commented 7 years ago

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 commented 7 years ago

Here is some more information for myself on this topic:

theotocopulitos commented 7 years ago

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

ianc125 commented 7 years ago

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.

hmhrex commented 7 years ago

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

hubbcaps commented 7 years ago

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.

bpepple commented 7 years ago

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.)

trumblejoe commented 6 years ago

@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.

bpepple commented 6 years ago

@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