Welcome, Guest
Python Scripts for ComicRack

TOPIC: Arturo's New Comics Toolbox

Arturo's New Comics Toolbox 8 years 3 months ago #3827

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



Hello,

I wanted to share these little scripts... I use them often, part of them are adapted from the work of greenlanterprime, wadegiles, yellowbox, and oraclexview.

I will first explain why I made them and what I use them for... It is based on the proccess I follow with 0-days comics:
  1. I export all the comics as .cbz from ComicRack, since CR likes them much more that cbr (rar) and can save the comic info to the archives themselves.

  2. When you get 0-days it is hard to order them, to choose which ones to keep if you have a favourite scanner and so on, to choose between c2c, c2c0 or all those many choices... Also I like to keep the name of the scanner in my comics to give them credit as needed. So I use the two first little scripts:
    ScannerTagsFromName.py and ScanTypeFromName.py to save the scanner name (if any) and the scan type (c2c, etc...) as tags for the comic. These scripts are not but a simplified version of the script Import tags from filename with regular expressions (http://comicrack.cyolito.com/index.php?option=com_kunena&Itemid=9&func=view&catid=13&id=1134), with the needed regexp hardcoded. They do a good job getting scanner credits when DCP or Minutemen groups are included, but fails otherwhise, and good to get c2c, etc, but fail to get "fichè" when they are numbered like "XXXX 23f"... This will come in version 0.2, if there is any interest in these scripts. In any case, the point it that I want my comics to keep the info on scanner and scan type
  3. Now I sort them by series and issue and compare tags, and remove the duplicated that I do not want easier than from windows explorer. I want to make this automagically via a script that still needs to be written to which I will provide a series of rules of preference to choose a given copy of any duplicate over the rest.
  4. Next I import the info from Chronowerks database (now I am giving a try to my script to import from ComicVines, which holds more info for 0-days... I will post it next week).
  5. Now I have all my 0-days sorted and documented, and I can move them to the corresponding folders using the Standarize Comic Files Tweaked (http://comicrack.cyolito.com/index.php?option=com_kunena&Itemid=9&func=view&catid=13&id=3661) script. But before I do this, there is a problem: all the info I want to keep for the comic, i.e., the scanner type, the scan type and the database reference, are stored as 'tags', which are not saved to the comicfile comicinfo.xml file! So there are a couple more scripts to 'save' these tags (and any other) to the 'notes' field, which is saved to the comic archive, and to retrieve the info back to the tags if needed (if you move the comic files somewhere, or if you lose your database, that is the only place where tags are kept). These scripts are SaveTagstoNotes.py and RetrieveTagsFromNotes.py. They move tags from the tags to the notes fields making sure no one is duplicated, and respecting existing tags and notes; to do this, when tags are saved to the notes field, the exisiting notes are preserved, and tags are saved as
    ||| Tags: tag1, tag2, tag3... |||

Finally there are two little scripts to clear all tags and notes fileds in case you want to start from scratch.

I know these are very personal, but if you happen to use them and like them and can think of ways to improve, I'd love to hear from you, please.

My ultimate goal is integrate all these in a single script (toolbox) to deal automatically with 0-days and do all this in a single step.

Hope you enjoy :blush:

File Attachment:

File Name: New_Comics...ox_0.zip
File Size:8 KB
Last Edit: 8 years 3 months ago by perezmu.
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3842

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
perezmu:
I just posted a question to incorporate tags into the script I have been working on after you first mentioned this to me…I thought this was a great idea of yours to preserve this info. The “SaveTagstoNotes.py” and “RetrieveTagsFromNotes.py” sound like great tools to work around the issue of Tags not being saved to the comicinfo XML data file. So, just where is the Tag data stored though, if it’s not kept in the XML data file? I wonder?

I think it’s a great idea to create a nice ComicRack Script Survival Guide pack/toolbox as it were to help others better control and organize their eComics.

Onyx X aka SoundWave
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3843

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
oraclexview wrote:
perezmu:
I just posted a question to incorporate tags into the script I have been working on after you first mentioned this to me…I thought this was a great idea of yours to preserve this info. The “SaveTagstoNotes.py” and “RetrieveTagsFromNotes.py” sound like great tools to work around the issue of Tags not being saved to the comicinfo XML data file. So, just where is the Tag data stored though, if it’s not kept in the XML data file? I wonder?

Hi, feel free to hijack my scripts as needed! The tags info is saved in ComicRack's internal DB... we tend to forget that first and foremost, CR is a database of our comics... the ability to save this info to comicinfo.xml files is a "backup", but the real info CR used until very recently (and mostly keeps using) is its internal Database... there is where the tags info is kept.

Thus if you move your comics to a new computer, you lose the Tags!
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3845

  • chaoshunter
  • chaoshunter's Avatar
  • Offline
  • Junior Boarder
  • Posts: 29
  • Karma: 0
Wow, good job on the script. Saves me a lot of time compared to manual entry.

For the ScannerTagsFromName script, is there anyway to improve the names it puts into the Tags field. First of all, I'm not using this on 0-day comics so that might be it, but some scanner names are incomplete and others don't scan. Is there anyway for me to fix this, or is that an update on your end?

Once again, great work.
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3846

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
I see…I wondered if ComicRack was using some internal database. So, I would think the internal database has to be stored in a file somewhere on the local drive. If not, that would be a great future functionality of the application. To have the ability to access every data field in the database that the user updates within the application would be excellent - just like MediaMonkey does (which I must say is the best music file manager out there today). However, since cYo hasn’t gotten back to me on any of my data structure inquiries, I’m sure cYo has their hands full with debugging and upgrading the next official release of the app. When cYo’s time is adequately freed up, I wouldn’t doubt that there’ll be some future update to allow us more access to more data fields.

In the mean time, I’ve begun taking a close look at both wadegiles’ & yellowbox’s great scripts to see how I can learn from them, and possibly incorporate some of their functionality into my own script.

So have you already written a script to add the scanner name and scan type to the file name?

Onyx X aka SoundWave
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3848

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

I am glad I could help...

chaoshunter wrote:
For the ScannerTagsFromName script, is there anyway to improve the names it puts into the Tags field. First of all, I'm not using this on 0-day comics so that might be it, but some scanner names are incomplete and others don't scan. Is there anyway for me to fix this, or is that an update on your end?

I know it is not as accurate as it should for a release :blush: , but I thought I would post it to see if there was some interest... If you know a little about regular expressions it is very easy to update for yourself (or you could use the "get tags from filename" I mention in the first post). Otherwise, I'd love to get some filename examples (you can pm me them if you like) and I will update it myself... the more general I can make it, the more useful it will be...

however, it can take me a couple of days to get to it, since now I am finishing a script to get info for the comics from comicvine.com
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3849

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
oraclexview wrote:
So have you already written a script to add the scanner name and scan type to the file name?

Not yet, but I am sure you can do it! :P Consider that the field Book.Tags is scriptable! I'll try when I finish my current task, though!

I am not very aware of the structure of the DB in ComicRack, but I guess there are people around that can give us some light on the topic!
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3850

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
perezmu wrote:
So there are a couple more scripts to 'save' these tags (and any other) to the 'notes' field, which is saved to the comic archive, and to retrieve the info back to the tags if needed (if you move the comic files somewhere, or if you lose your database, that is the only place where tags are kept). These scripts are SaveTagstoNotes.py and RetrieveTagsFromNotes.py. They move tags from the tags to the notes fields making sure no one is duplicated, and respecting existing tags and notes

Sorry :blush: ... I am afraid I messed up my version files and the script SaveTagstoNotes.py does not work as announced: it is not preserving previous notes... I will post a fix tomorrow. sorry again
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3852

  • chaoshunter
  • chaoshunter's Avatar
  • Offline
  • Junior Boarder
  • Posts: 29
  • Karma: 0
I was just about to post that. As for the naming not being quite recognizable, I can wait until you update it and yes, I do appreciate your scripts (despite there not being as many replies as one would hope).

EDIT: I'm wondering, how hard would it be for you (or me if it's easy enough), to make it so that the tags are saved to "Tags" and "Notes"? That would make the entire process much faster.
Last Edit: 8 years 3 months ago by chaoshunter.
The administrator has disabled public write access.

Re:Arturo's New Comics Toolbox 8 years 3 months ago #3853

  • oraclexview
  • oraclexview's Avatar
  • Offline
  • Moderator
  • aka SoundWave
  • Posts: 906
  • Thank you received: 182
  • Karma: 37
perezmu wrote:
Not yet, but I am sure you can do it! :P Consider that the field Book.Tags is scriptable! I'll try when I finish my current task, though!

Then I'll go ahead and work on adding both scanner name and scan type to the script I posted at the end of last month while you continue to focus on updating and improving the Comicvine script.

What are the scan types that you'd like the script to handle?

Onyx X aka SoundWave
Last Edit: 8 years 3 months ago by oraclexview.
The administrator has disabled public write access.
Time to create page: 0.222 seconds

Who's Online

We have 215 guests and 7 members online