Welcome, Guest
Python Scripts for ComicRack

TOPIC: Import ComicBookDB information

Import ComicBookDB information 9 years 11 months ago #203

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
NO LONGER ACTIVELY SUPPORTED. CURRENTLY NONFUNCTIONAL. REMOVING DOWNLOAD LINK. GO HERE INSTEAD => greenlanternprime's Chronowerks Comic Database thread.

Installation is simple. Extact the contents of the file attached to this post to your \ComicRack\Scripts folder and restart ComicRack. Select one or more comics and right-click. Under the Automation menu you'll find a new menu item named "Import ComicBookDB Info" with a green plus-sign icon. Select that option to start the import.

Using ComicInfo scripts as a guide and resource, I created a ComicRack integrated script with similar functionality. Thanks to Sharkus and cYo for inspiring this little extension.

First the script presents a dialog to allow the user to change the default import options. On this screen you can uncheck items to prevent any information from being imported into ComicRack for a particular field. You can elect not to overwrite existing ComicRack information and you can choose to use the publication start year for a series as the Volume number during the import. You are only presented these options once no matter how many different series you are updating.

Next, the script attempts to update ComicRack with information from ComicBookDB.com. If the script can't figure out which of a number of series or issues is correct, the user is prompted to choose which to use when updating information for a comic. At this point, the user could also elect to Cancel and not update that particular comic issue.

Finally, if the script successfully locates unambigous information, empty and gray fields will be written if any was found. If no information is found on ComicBookDB for a particular field, no action is taken regardless of whether overwrite is enabled or not.

Being unable to find issue information is generally not an error condition for the purposes of this script. So if you don't see any updates and weren't alerted of any problems, then the information probably can't be located by the script. For instance, if your issue number information contains non-numeric characters, the script skips that comic without complaint.

For those who have used the ComicInfo scripts, here is a summary of differences between ImportComicDBInfo and ComicInfo:
  • Integrated into ComicRack user interface and accessible via right click menu. ComicInfo is a command-line script requiring installation of Python.
  • No explicit annual issue lookup attempts. All non-numbered issues are returned from which the user selects to import information. ComicInfo tries to look up Annual issues explicitely.
  • Information updates made via hooks into ComicRack's data storage scheme. Comic info strictly deals with comicinfo.xml files contained in comic book archive files.
  • No filename or filepath changes via this script since that is outside the scope of what I wanted to accomplish. ComicInfo offers options for renaming comic book archives.

Some additional features include:
  • Configuration options are via dialog box and no text editing is required to change them.
  • A series name different from the one stored in ComicRack can be specified by while importing. This enables discrepancies between the import series name and the ComicRack series name to be overcome without changing the user's preferred way to name a series.
Attachments:
Last Edit: 9 years 3 months ago by wadegiles.
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #205

  • sharkus
  • sharkus's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Karma: 3
Sweet! I can't wait to give this a try...

Unfortunately, I just joined a cult (i.e. got an iMac) so I still need to figure out the best way to run ComicRack...
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #207

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
Updated file posted. Had problem when resolving ambiguous issues and presenting choices to user.
ImportComicBookDbInfo1.1
Attachments:
Last Edit: 9 years 11 months ago by wadegiles.
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #208

  • Zengei
  • Zengei's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Karma: 1
Nice, I was thinking of undertaking integration of ComicInfo with ComicRack as a side project for myself but damn work and school!

Anyway, you said it uses ComicRack's hooks to update the info, but does it also write an XML or not?
http://www.zengei.com/images/offsite/comicsig/random.php
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #209

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
It does whatever ComicRack does. ComicInfo was created to add, edit, and update ComicInfo.xml files. This script was created to update information contained in ComicRack.

If ComicRack updates the XML when you edit a field, then using the script should too.
Last Edit: 9 years 11 months ago by wadegiles.
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #210

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
I need to implement better month handling. Non-standard values for months are being used on ComicBookDB.com to indicate multiple month ranges as follows:
    Month - Translation
  • 13 – Spring
  • 14 – Summer
  • 15 – Fall
  • 16 – Winter
  • 17 – Annual
  • 18 – NONE
  • 19 – Jan/Feb
  • 20 – Mar/Apr
  • 21 – May/Jun
  • 22 – Jul/Aug
  • 23 – Sep/Oct
  • 24 – Nov/Dec
  • 25 – Holiday
  • 26 – Dec/Jan
  • 27 – Feb/Mar
  • 28 – Apr/May
  • 29 – Jun/Jul
  • 30 – Aug/Sep
  • 31 – Oct/Nov
Right now the script just assumes the ComicBookDB month is good and stuffs it into ComicRack without translating or bounds checking.
Last Edit: 9 years 11 months ago by wadegiles.
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #211

  • wadegiles
  • wadegiles's Avatar
  • Offline
  • Gold Boarder
  • Posts: 248
  • Thank you received: 3
  • Karma: 20
Found another problem assigning issues. Cancelling the selection box didn't work right and wrong information was imported. Updated first post with new version that fixes this problem and the months assignment.
Attachments:
Last Edit: 9 years 11 months ago by wadegiles.
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #212

  • cYo
  • cYo's Avatar
  • Offline
  • Moderator
  • Posts: 3476
  • Thank you received: 675
  • Karma: 181
congrats :)

Didn't have time to try it out, though.

As stated earlier, this is a plugin for ComicRack, so it does not have to update the XML files manually. ComicRack will write the info to the files or database.

A future version will include the option to dynamically updated xml files in supported file types (CBZ, CBT).
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #214

  • greenlanternprime
  • greenlanternprime's Avatar
  • Offline
  • Expert Boarder
  • Me Grimlock.. Bad Ass!
  • Posts: 103
  • Karma: 10
The plugin Script works ok, it dosn't pick up all the fields that the oringinal script did, but it does allow you to quickly identify and tag what you are are after...

Hopefully applications like this will encorage people to update the comicbookdb.com and help the website become better...
The administrator has disabled public write access.

Re:Import ComicBookDB information 9 years 11 months ago #215

  • cYo
  • cYo's Avatar
  • Offline
  • Moderator
  • Posts: 3476
  • Thank you received: 675
  • Karma: 181
it does not do ok, it's fantastic :)
I really like it. Actually i always wished for something like that.

Well what i plan for the future of ComicRack and this site would be something like:

a) a file hash database for comicrack to lookup info (and also upload of course)
b) a full blown database like ComicDB, first without web frontend, later with.

PHP Soap anyone out there ? :)
The administrator has disabled public write access.
Time to create page: 0.218 seconds

Who's Online

We have 166 guests and 6 members online