Welcome, Guest
Python Scripts for ComicRack

TOPIC: ComicBookInfo Injector

Re: ComicBookInfo Injector 6 years 3 weeks ago #16628

  • Surfal666
  • Surfal666's Avatar
  • Offline
  • Senior Boarder
  • Posts: 64
  • Thank you received: 4
  • Karma: 2
The desktop version of CBL doesn't write to the zip comment block - uses a resource fork - so it's not like there's a version to reverse engineer. All I've got to work with is the published spec, which has known errors.

Unfortunately, the chance of me coming back to work on this now is pretty slim. All the code and reference material is there - if someone else wants to pick it up, go for it.
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 3 weeks ago #16629

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
Surfal666 wrote:
The desktop version of CBL doesn't write to the zip comment block - uses a resource fork - so it's not like there's a version to reverse engineer. All I've got to work with is the published spec, which has known errors.
There appears to be a difference between how CBL writes to cbz & cbr files:

For a cbz/zip file it's stored in the comment field of the zip. By extracting the zip and re-creating it, you're effectively removing the comment field. You can see the comment field by typing the following in the terminal:
unzip -z filename.cbz

For a cbr/rar file it's stored as an extended attribute for the file. You can see it by (in the terminal again):
xattr -p com.bitcartel.comicbooklover.xattr.metadata filename.cbr

If you just want to remove the comicbooklover stored information from the files you can remove them form comicbooklover, then:
xattr -d com.bitcartel.comicbooklover.xattr.metadata filename.cbr
or
zip -z filename.cbz < /dev/null

Then you can re-add the files back into comicbooklover and there will be no tags for the files.
Surfal666 wrote:
Unfortunately, the chance of me coming back to work on this now is pretty slim. All the code and reference material is there - if someone else wants to pick it up, go for it.
Please give it a last try. :unsure:
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 3 weeks ago #16630

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
And there is more...

pycomicmetathis is a comicvine scraper that pulls metadata into the comments section of the cbz file. I tried it on my Mac, but can't make it work yet. (Currently I don't have access to my PC, I'll tell you the results from that too). If anyone gets lucky with this, please tell us..

I have also discovered on the net (credit to original author) a small app in VB.NET to take the ComicBookInfo from your comics on window and to transfer the same to the Zip Comments for importing into Mac.

File Attachment:

File Name: ComicBookI....NET.zip
File Size:7 KB
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 2 weeks ago #16713

  • chinstrap
  • chinstrap's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
Okay, I got frustrated with all this, so I sat down last night and wrote a crplugin that writes the ComicBookInfo metadata into CBZ files. ComicBookLover on the iPad and on the desktop both read my files fine. You can select multiple files to update at once, doesn't matter. Only caveats are:

1) It doesn't show any progress while it's working. I'm not a .NET guy by trade (though I am a python one), so the fact that I got any dialogs in there at all is a miracle.
2) The dialog at the end showing successes/failures is ugly as sin. See #1.
3) Occasionally it will fail. I don't know why, but some cbz files won't parse. I check them and they are definitely zip files, not just renamed RAR files or similar, but apparently whatever program made them to begin with I can't parse. Unzipping and rezipping them with 7zip has worked for me 100% of the time.

This script does write to your files, so there is always the potential that they will get totally munged beyond all recovery (though it is unlikely). Use at your own risk. Make backups. Kiss your momma. Etc.
Last Edit: 6 years 2 weeks ago by chinstrap. Reason: Remove apparently broke plugin
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 2 weeks ago #16714

  • cbanack
  • cbanack's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1318
  • Thank you received: 503
  • Karma: 181
Cool! So does your script write the metadata out in both ComicRack AND ComicBookLover format?

They are wo different formats, right?
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 2 weeks ago #16715

  • chinstrap
  • chinstrap's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
It reads whatever data ComicRack has and inserts it in ComicBookLover's format.
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 2 weeks ago #16717

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
chinstrap wrote:
Okay, I got frustrated with all this, so I sat down last night and wrote a crplugin that writes the ComicBookInfo metadata into CBZ files. ComicBookLover on the iPad and on the desktop both read my files fine.
+1 karma for the work initiated! :-)

It is throwing an exception on my system. :(

I simply right-clicked a book and chose the script option:





I tried it on a number of books, but the exception always comes up. Please help me, chinstrap....
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 2 weeks ago #16738

  • chinstrap
  • chinstrap's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
Hmm, it's possible I have a .NET assembly installed that is letting this work for me that is not installed by default. Try this one and let me know.
Attachments:
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 2 weeks ago #16742

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
chinstrap wrote:
Hmm, it's possible I have a .NET assembly installed that is letting this work for me that is not installed by default. Try this one and let me know.
This one still throws an exception, just like the previous one.. :(
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
The administrator has disabled public write access.

Re: ComicBookInfo Injector 6 years 2 weeks ago #16758

  • chinstrap
  • chinstrap's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
Okay, this is just bizarre. I'm going to make a fresh Windows virtual machine, clean install of CR, and see if I can reproduce it.
The administrator has disabled public write access.
Time to create page: 0.236 seconds

Who's Online

We have 195 guests and one member online