Welcome, Guest
Python Scripts for ComicRack

TOPIC: Suggestions for the a ComicVine script

Re:Suggestions for the a ComicVine script 7 years 9 months ago #5050

perezmu wrote:
DouglasBubbletrousers wrote:


I am not sure I understand you. For each issue their corresponding ID is saved to the notes field. You mean saving also the ID for the series?

I mean the ID for the creator or character. For instance, Angel After The Fall 29 lists the writer as Bill Williams, but within the listing's hyperlink code is the proper ID:

<a href="/bill-williams/26-2410/" class="bold">Bill Williams</a>
In this case, I would love it if the script posted it as:
Bill Williams [2410]

Same goes for penciller, inker, colorist, characters etc.

Is this available via the API you use?
The administrator has disabled public write access.

Re:Suggestions for the a ComicVine script 7 years 9 months ago #5051

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
DouglasBubbletrousers wrote:
DouglasBubbletrousers wrote:
Is this available via the API you use?

Indeed it is, but honestly I am not very sure about this, we are not trying to replicate their database here... I'd like to hear more opinions before making a decision.

Cheers!
The administrator has disabled public write access.

Avoid date overwritten by "0/0" 7 years 9 months ago #5052

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
I make my own suggestions not to forget anything:

Many old comics have little data... when a comic does not have date on comicvine the existing date is overwritten by "0/0" - this should be avoided. Note that it is not the same as not ticking date in the import options, because this would still import existing dates...
The administrator has disabled public write access.

Re:Suggestions for the a ComicVine script 7 years 9 months ago #5053

perezmu wrote:

Indeed it is, but honestly I am not very sure about this, we are not trying to replicate their database here... I'd like to hear more opinions before making a decision.

Cheers!

Understandable, as it may not be useful for many. I'll try and convert the script to adapt to my needs personally, though I may bug you for some help :)
The administrator has disabled public write access.

Create debug log even if CR crashes or hangs 7 years 9 months ago #5054

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
Ditto!
The administrator has disabled public write access.

Re:Avoid date overwritten by 7 years 9 months ago #5055

perezmu wrote:
I make my own suggestions not to forget anything:

Many old comics have little data... when a comic does not have date on comicvine the existing date is overwritten by "0/0" - this should be avoided. Note that it is not the same as not ticking date in the import options, because this would still import existing dates...

Oh yeah, this absolutely should be done.

Have you considered appending data instead of overwriting? For instance, piecing out each entry in the newly imported data, comparing it to the existing field and appending it to the end if it's not already in the field?

Also, I suspect the script currently compares the new data to the existing data in a field and if it's the same, does not overwrite? Is this the case? If so this would help minimize file modifications for those of us who track updates that way.

Thanks again for all your hard work on this! If you need help with anything, I am indebted to at least try :)
Last Edit: 7 years 9 months ago by DouglasBubbletrousers.
The administrator has disabled public write access.

Re:Suggestions for the a ComicVine script 7 years 9 months ago #5056

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
DouglasBubbletrousers wrote:
Understandable, as it may not be useful for many. I'll try and convert the script to adapt to my needs personally, though I may bug you for some help :)

Be my guest! :)
The administrator has disabled public write access.

Re:Avoid date overwritten by 7 years 9 months ago #5057

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
DouglasBubbletrousers wrote:
Have you considered appending data instead of overwriting? For instance, piecing out each entry in the newly imported data, comparing it to the existing field and appending it to the end if it's not already in the field?

This would require extensive text parsing... As of now if a field was ticked in the front form for update, no comparison is made, it is directly overwritten. It is difficult to compare, unless you mean for those comics that had been previously imported, for those that would be possible, but for the first-time imported, it is unlikely that any field in a comic matches the info on the database... I'll think on this...

Cheers! :woohoo:
The administrator has disabled public write access.

Re:Avoid date overwritten by 7 years 9 months ago #5058

perezmu wrote:
DouglasBubbletrousers wrote:
Have you considered appending data instead of overwriting? For instance, piecing out each entry in the newly imported data, comparing it to the existing field and appending it to the end if it's not already in the field?

This would require extensive text parsing... As of now if a field was ticked in the front form for update, no comparison is made, it is directly overwritten. It is difficult to compare, unless you mean for those comics that had been previously imported, for those that would be possible, but for the first-time imported, it is unlikely that any field in a comic matches the info on the database... I'll think on this...

Cheers! :woohoo:

I don't know that it has to be too smart.

For instance, let's say the script finds two writers (Bill X and Bob Y). The current Writer field contains Bob Y.

For each element found for a field (in this case, 2):
______if book.Writer.find(writer[x])==-1:
____________book.Writer=book.Writer+", "+writer[x]

Script runs, sees "Bill X" is not in the writer field and appends it. Then it sees "Bob Y" is in the script, so it continues without modifying the field. Perfect? No, but it should work pretty well for existing CV-imported metadata.

The main reason I'm suggesting this is importing data on a Wednesday when new books come out and the entry in CV is extremely thin. I can re-run it later when the entry has been fleshed out and it will add the new data.

I'm sure the question "so why not just overwrite the data?" comes up. Well, there's a few reasons. One is a need to preserve pre-existing or custom metadata. We can add additional metadata to the existing (which may double if the strings don't match, but at least both are preserved).

The second reason is overwriting causes more disk hits. You seem to be indicating it's not incremental about updates, but rather sledgehammers the file, possibly unintentionally by overwriting data with the exact same data. This issue can be dealt with either by appending or by smarter updating (as I said, testing the existing data against the new field and skipping the update if it's equal) or, if the API allows, parsing out the book's last updated datetime from the notes and comparing it against the CV entry's last updated datetime (assuming such a datetime exists in the API).

Also, a more minor reason is that the file isn't updated if nothing's changed, so backing up the files is less frequent and only as needed (as my backing up is based off file modification datetimes).

So the two issues here are unnecessary updating and adding to existing metadata without data loss of the existing metadata. Is anyone else grappling with these problems?
Last Edit: 7 years 9 months ago by DouglasBubbletrousers.
The administrator has disabled public write access.

Re:Avoid date overwritten by 7 years 9 months ago #5064

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
DouglasBubbletrousers wrote:
Is anyone else grappling with these problems?

Yep, I understand what you are asking for, since you seem to have everything (wonderfully) set up in your comics collection, but I think that would complicate too much the scritp for the general needs.
The administrator has disabled public write access.
Time to create page: 0.209 seconds

Who's Online

We have 204 guests and 5 members online