Welcome, Guest
Python Scripts for ComicRack

TOPIC: (New) Import Comic Info From ComicVine

(New) Import Comic Info From ComicVine 8 years 3 months ago #4283

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
SCRIPT BROKEN

due to the upgrade of the scripting engine to Ironpython 2.6 the script does not work in CR versions above 0.9.113 - While I get to fix it :blush:

I urge you to try cbanack's one


NEW VERSION: 0.8.1 in the downloads section.

This should fix some bugs introduced by version 0.8.0.
NEW VERSION: 0.8.0 in the downloads section.

IMPORTANT: NEW INSTALLATION PROCEDURE - READ THE WHOLE POST!!!!!!!

IMPORTANT: Use ComicRack v.0.9.113 & above!!!!!!

Thanks to Stonepaw & cbanack for this version
Read this post for introduction and installation instructions


Intro
Obviously, this script allows you to download comics info from comicvine.com
I am starting a new threat for the latest version of the script, since there are *many* changes in the newest version. I am aware some people may not like some of the features added, but most of them can be turned off at wish. The new script takes into account comments and requests from the old thread... hope you like it.

For the oldest here:
# Changelog:
# [X] Fixed: - Error saving and retrieving configuration options.
# [X] Fixed: - Looked for default cover image in wrong directory.

The script is complex, and requires a minimal installation process, so READ THIS MAIL BEFORE PROCEEDING to the download area

Credits: Note that this script is heavily based on a previous one by wadegiles. Thanks to the API available for ComicVine, most of my work has been to replace his works on regexpressions to XML tags management. Credit must be his. Also, I am using two external libraries for xml access coded by DevHawk (details in the source code). Also cYo helped me to make the script much more usable. cbanack provided the code to correctly parse unicode names. Latest suggestions by Stonepaw helped with the permissions issue.

Notes:The script now saves and searches the comic database id in both, the Tags and Notes field, so if you save the comic info to the comic file, even though the tags are not saved, the info is not lost, since it is still in the notes field, and the script can find it there.

How to install:


1 - First time install
This is the easy one:

To install the script please unzip the file to
%APPDATA%\cYo\ComicRack\Scripts\comicvine
(%APPDATA% expands to your Windows application data folder. Simply enter it into explorer and hit enter) [note: no need to move files around anymore thanks to cYo's work on 0.9.113]. That was easy.


2 - Upgrading from previous versions of the script (v.7.9 and below)
This is the easy too, but you need to get rid of the old script:

1) To install the script please unzip the file to
%APPDATA%\cYo\ComicRack\Scripts\comicvine
(%APPDATA% expands to your Windows application data folder. Simply enter it into explorer and hit enter) [note: no need to move files around anymore thanks to cYo's work on 0.9.113]. That was easy.

2) If you want to keep all your local cache files, find them (*.dat) in your old script folder and MOVE them to
%APPDATA%\cYo\ComicRack\Scripts\comicvine\localCache
(you may need to create the last directory)

3) Delete the old comicvine script directory if it was different than the new one (i.e. if it was under "Program Files\ComicRack\Scripts". Also you can remove the following files that you had to move when you previously installed the script: publishers.py, imprints.py, xml2py.py, ipypulldom.py (note that the publishers and imprints files can be moved over the new ones if you made custom changes to any of them).

4) If in doubt, ask in this thread.

Usage: As usual, select the ecomics you want to get info for, rightclick, select Automation -> ImportcomicVineInfo, and let the magic be done!

The script now includes local caching of series, so that the scripts keeps being slow the first time you search for a long series, but it saves its info to a local file, so further searches will be fast needing only to download issues that were added to comicvine since last searh (if any!).

Options
    <li>
Convert Imprints to Imprints/Publisher</li>
Comicvine does not consider imprints such as Vertigo as a subset of a Publisher, but like a publisher itself. I do not like this, so the file imprints.py includes the list of imprints/publishers pairs from comicbookdb.com; if this option is selected, imprints will be entered in the comicbookdb.com style. Also, some publishers in comicvine are rather strange (Marvel Publishing, not Marvel Comics!!??!!!); the file publishers.py provides a list of substitutions that are also triggered by this option.

<li>Specify the Series name...</li>
It is very self explanatory, asks for the series names for each comic

<li>Display SERIES covers</li>
When there are several series that match a series title in comicvine, you are given the option to choose which one you like... sometimes you do not know the year or volume of the comic you are searching, so this option allows you to see a cover for each series that you can compare to the cover of the comic that is being processed. I think this is useful, but it may be slow (for instance, looking for "X" results in 300+ series, and that is a lot of covers to download...!). Use with caution. In any case, a progress bar will let you know everything is working.

<li>Display ISSUE covers</li>
When no match for the issue number is found, the list of issues is shown for you to choose; like in the previous case setting this option shows you covers to compare with... however, it does it in a slightly different way.. since it is very likely that you have looooong lists of issues, preloading all covers would be very slow and likely a waste of time... instead, covers are loaded when a comic is highlighted... This option is very useful for things like annuals in which numbering is not clear (is it #21 or 1999?)... Try it, and if it is too slow for you, just turn it off!

Troubleshooting:
Troubleshooting has been simplified: a new option can be set (Verbose Debug Log), no need to rename files or anything. So to send a report you just have to:
    <li>Run ComicRack in debug mode</li>
To make it simpler debugging your script you should start ComicRack with the following command line (or add those options to the shortcut in your desktop or programs menu):

ComicRack.exe -dso -ssc

The meaning of these switches is:

-dso is Disable Script Optimization
Scripts are always reloaded when executed. Otherwise they are compiled once during startup.
-ssc is Show Script Console
With this you get a look at all your script output (good for debugging messages).

Now you should have the normal ComicRack window and a little text window were the scripts will spit their output
<li>Run the script setting on the Debug option on the comics you found to give problems</li>
<li>Go to the Script Console, copy the log and send it to me using pastebin.com</li>
<li>Finally, in your bug post, please be sure to include the following:
    <li>ComicRack Version</li>
    <li>Windows Version (inc. 32,64 bits)</li>
    <li>Link to your debug log pasted at pastebin.com</li>
</li>

Final Words and Request: I hope this script serves you well. The ComicVine database is reasonably well populated. Please, if you use this script, and find it useful, consider contributing info of your own in comicvine.com... it is easy, sing-up, and if you try to get info for a comic that it is not there, just add the info yourself!

Download Newest version is always available in the downloads section of the Comicrack site. To help you check the new local caching feature, the data file for one of the longest series (Act..Com...) is included (800+ issues), so when you try to download info for any issue of this series it will be real fast!!!!

Enjoy!
Last Edit: 7 years 10 months ago by perezmu.
The administrator has disabled public write access.

Re: (New) Import Comic Info From ComicVine 8 years 3 months ago #4285

  • RevQuixo
  • RevQuixo's Avatar
  • Offline
  • Gold Boarder
  • Posts: 280
  • Thank you received: 26
  • Karma: 12
Love the new interface...but running into a problem.

Whenever a series has multiple runs ie: Green Lantern Corps, the script seems to hang after the thumbnail of the cover and the specify series box pops up. It never gets to the point where I can specify which volume it is.

Also in the instructions above you mentiondeleting a comicvine.dat file...I can't find this anywhere. I just deleted all the old comicvine script stuff that wasn't in the zip file.

In terms of options, I am not using either of the display series covers or issue covers options but I am converting imprints & specifying series
Last Edit: 8 years 3 months ago by RevQuixo.
The administrator has disabled public write access.

Re: (New) Import Comic Info From ComicVine 8 years 3 months ago #4286

  • RevQuixo
  • RevQuixo's Avatar
  • Offline
  • Gold Boarder
  • Posts: 280
  • Thank you received: 26
  • Karma: 12
Incidently..unchecking the specify series box makes everything work beautifully. :)
The administrator has disabled public write access.

Re:(New) Import Comic Info From ComicVine 8 years 3 months ago #4287

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
Hi! Could you try and send a debug log? Come to think of it, if it hangs, you probably can't. Anyway i will not be able to look into it until tomorrow. It is past bedtime in this part of the world.
The administrator has disabled public write access.

Re: (New) Import Comic Info From ComicVine 8 years 3 months ago #4288

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
<strong>RevQuixo wrote:</strong>
Incidently..unchecking the specify series box makes everything work beautifully. :)
great! I will look into that!
The administrator has disabled public write access.

Re:(New) Import Comic Info From ComicVine 8 years 3 months ago #4289

  • Knight Rider
  • Knight Rider's Avatar
  • Offline
  • Expert Boarder
  • Posts: 135
  • Thank you received: 11
  • Karma: 16
1, 10, 100, no...
1.000 stars to your script.
thanks for the great job
The administrator has disabled public write access.

Re:(New) Import Comic Info From ComicVine 8 years 3 months ago #4290

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
A no-prize from the bullpen to RevQuixo for finding the first bug

bug: script freezes when using the "specify series name..." option...

to fix: wrap text in main window in case the series+issue+year is too long
The administrator has disabled public write access.

Re: (New) Import Comic Info From ComicVine 8 years 3 months ago #4291

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
<strong>RevQuixo wrote:</strong>
Also in the instructions above you mentiondeleting a comicvine.dat file...I can't find this anywhere. I just deleted all the old comicvine script stuff that wasn't in the zip file.

Thanks, you are right, this was wrong... it should read "ImportComicVineInfo.dat"... I edited it in the first post.
The administrator has disabled public write access.

Re: (New) Import Comic Info From ComicVine 8 years 3 months ago #4292

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
I forgot one important...

<strong>Note</strong>

The script now saves and searches the comic database id in both, the Tags and Notes field, so if you save the comic info to the comic file, even though the tags are not saved, the info is not lost, since it is still in the notes field, and the script can find it there.

(added to the first post)
The administrator has disabled public write access.

Re: (New) Import Comic Info From ComicVine 8 years 3 months ago #4294

Hi, perezmu, congratulation for script.
I have a problem, the script "xml2py.py" don't initialized.
The debug code is in pastbin.com "pastebin.com/m78399f56" and my directory struture is
Comicrack\Scripts\xml2py.py
Comicrack\Scripts\publishers.py
Comicrack\Scripts\ipypulldom.py
Comicrack\Scripts\imprints.py
Comicrack\Scripts\comicvine\18005.dat
Comicrack\Scripts\comicvine\comicvinelogo.jpg
Comicrack\Scripts\comicvine\ImportComicVineInfo.dat
Comicrack\Scripts\comicvine\ImportComicVineInfo.png
Comicrack\Scripts\comicvine\ImportComicVineInfo.py
Comicrack\Scripts\comicvine\ImportComicVineInfo.xml

Thanks
The administrator has disabled public write access.
Time to create page: 0.440 seconds

Who's Online

We have 253 guests and one member online