Welcome, Guest
News and Announcements

TOPIC: How would you do this?

How would you do this? 1 year 5 months ago #45549

  • chrisdukes
  • chrisdukes's Avatar
  • Offline
  • Fresh Boarder
  • Is it Wednesday yet?
  • Posts: 17
  • Thank you received: 1
  • Karma: 0
So, I'm a big fan of Hellboy and Star Wars comics. Both Universes span thousands of years and neither was published in chronological order, obviously. But, both are fun to read in chronological order, especially Hellboy. So, how do I use tags to record the year each comic takes place?

Example:
  • "Hellboy in Hell #4 - Death Riding an Elephant" takes place in 2011AD.
  • My file is named "Hellboy in Hell #4 - Death Riding an Elephant (2011 AD).cbz"
What I want to do (Ideally):
  • I want to copy the year, 2011AD, into a custom field called "Story Year".
  • I want to copy data from the filename with the script Tags From Filename, but it doesn't handle custom fields.
  • I want to store the custom field in the comic info XML, but I know that's not supported. I've accepted this.
  • I want to preserve the Comic Vine Database code (copied to the Notes field) for future re-scraping.
Basically:
  • How do I use Tags From Filename to populate fields that will be saved with the file?
Notes:
  • I'm willing to re-scrape all the comics in question.
  • I'm willing to remove the CVDB code from the notes. I've re-scraped fine without them.
  • I prize accuracy over speed, so I'm willing to devote oodles of time and effort.
  • I know the solution will probably involve regular expressions. I've accepted that.
These are the fields Tags From Filename covers:
Alternate Count, Alternate Number, Alternate Series, Colorist, Count, Cover Artist, Editor, Genre, Imprint, Inker, Letterer, Month, Notes, Number, Penciller, Publisher, Rating, Series, Summary, Tags, Title, Volume, Web, Writer, Year

These are the fields stored in the comicinfo.xml file
Characters, Colorist, Cover Artist, Format, Genre, Inker, Locations, Month, Notes, Number, Page Count, Pages, Penciller, Publisher, Series, Summary, Volume, Web, Writer, Year
The administrator has disabled public write access.

How would you do this? 1 year 5 months ago #45613

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
Mmmh... the only way I see to store this data in the comic xml, is to do an script that store the info in some kind of format in some saved field (notes for example) and then make and script that in case of "readding" the comic in a collection, translate this "coded info" into custom values again...

If your way of naming names is strictly in some format, you can store filename in notes easily (I think) with this script:

comicrack.cyolito.com/forum/13-scripts/2...release?limitstart=0

But to translate this in custom values, would require another script all the same...

In other words... I don't see an easy way to do this, not without making your own script at least...
The administrator has disabled public write access.

How would you do this? 1 year 5 months ago #45630

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
Xelloss is correct. You would have to write a script that uses regular expressions to take the "Story Year" info (shouldn't be too hard as long as it's always located at the end of your file names) and places it in a custom field named "Story Year" and also writes a line to the Notes field so that you can save the info in the book's XML info file.

There are scripts that you can take bits and pieces from to do this, such as Stonepaw's ComicVine Scrapper script (as long as you don't mind reading through the whole thing, all the parts you would need for your script are in that one script. That script already has code that uses regular expressions to parse a file name, it already places data into a custom field and already writes that same custom data to the Notes field.

Of course there are less complex scripts that do certain parts, such as "Tags From Filename" that can be used for regular expressions to parse a file name to a field. If you don't feel like spending the time to learn to code this in a script to save you countless more hours down the road, your only solution left is to do it all manually.
Last Edit: 1 year 5 months ago by oraclexview.
The administrator has disabled public write access.

How would you do this? 1 year 5 months ago #45637

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
On the XML side you could adapt my prototype Data Manager Rules here

The project stalled waiting for a working updated version of Data Manager but it was functioning with workarounds and allows you to save and repopulate tags in the notes field.

As I say, it is a prototype so use and adapt at your own risk.
Last Edit: 1 year 5 months ago by jkthemac.
The administrator has disabled public write access.

How would you do this? 1 year 5 months ago #45648

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
If you can wait a week or two, I am planning on a load/save script to automatically save all not saved data from CR to notes for file storing...

But for the filename to custom tags copy, you will have to find another script to do it... As that is not so easily done for custom filename formats... (I did a script for MY name rules, for example, but that change a lot from one name structure to other, and require a lot of debugging, or a robust way of personalizing it, as the excellent script I posted before has, which, unfortunately doesn't work with custom values (I think))

Edited: I think a way if doing what you are looking for could be using the regular expression script to temporary store the data in a non custom available data field, then easily copy this data to custom fields with another script that manage copying data to custom values, than rescrap the comics for completing the fields you used for temporary storage with the real info, and then save all the info with the script I am working on... But It is just to complicated :/
Last Edit: 1 year 5 months ago by Xelloss.
The administrator has disabled public write access.
Time to create page: 0.225 seconds

Who's Online

We have 168 guests and 3 members online