Welcome, Guest
Python Scripts for ComicRack

TOPIC: malor89's ComicRack Scripts

Re: malor89's ComicRack Scripts 4 years 2 months ago #35949

  • laxarus
  • laxarus's Avatar
  • Offline
  • Senior Boarder
  • Posts: 66
  • Thank you received: 3
  • Karma: 0
Wow, it's become flawless with these latest additions. Thanks again man. :)
The administrator has disabled public write access.

Re: malor89's ComicRack Scripts 4 years 2 months ago #35967

  • laxarus
  • laxarus's Avatar
  • Offline
  • Senior Boarder
  • Posts: 66
  • Thank you received: 3
  • Karma: 0
There is also this weird behavior i noticed. In my publisher list there are two entries which are "August" and "Gust". And the file is named as [Gust] xxxx.cbz

When I run the script on this file, publisher is written as "gust" in CR. However, when i remove the "August" entry from the list. The publisher is written as "Gust". Now, this is not a big issue but the script takes the partial "gust" script in "August" entry thus producing a capitalization issue. Another example is "elf" within "Shelf" entry. But there is also a separate entry named "Elf"

Another thing I'd like to ask is the title field behavior. In some books after executing the script the "title" field comes up empty and in some they contain appropriate title but my book names are kinda messy because they contain many special characters and they are in different languages. (Chinese, Japanese, Korean, Turkish, English). So, i want a global title field behavior when the script is executed. In efforts of organizing my achieve, i achieved a global filename format with partial success. Here is the most obscure example i managed to come up from my library.
filename:
[Rh.] xxxxxxxx ~ ttttt ~ (yyyyy) [zzzzz] {vvvvv} kkkk .cbz
What i want in the title is "xxxxxxxx ~ ttttt ~" but i am more than okay if i can just exclude the publisher which is "[Rh.]" from "title" field because like i said before the naming structure can be different for different files thus the need of more complex regex so just excluding the publisher from the "title" field is okay. I am guessing i need to comment out a couple of lines in the script but i am unclear as to which lines corresponds to the title field behavior. Could you help me out a little on that?
The administrator has disabled public write access.

Re: malor89's ComicRack Scripts 4 years 2 months ago #35971

  • malor89
  • malor89's Avatar
  • Offline
  • Senior Boarder
  • Posts: 73
  • Thank you received: 16
  • Karma: 17
The reverse lookup was allowing partial matches so Gust was matching the gust in August which is lower case. Easy fix.
m = re.search('(?i)[(|]('+publisher+')', publishers) #find in publishers list to get proper capitalization
So, now it looks for either '(' or '|' before starting the matching.

I used the Title field only for specific story names and the Series field for the main name of the comic. So, the Title field will often be blank. Basically it works by removing everything it can identify as not being the name of the comic and what's left is the Series.

Ex: "Fatman - Overeating #04 Fried Foods (of 06) (2013) (ScannerMan)" or "Fatman - Overeating - Fried Foods 04(of 06) (2013) (ScannerMan)" would both end up with the Series = "Fatman: Overeating" and Title = "Fried Foods".

You could simply change
book.Series = series
			book.Title = title
to
if (title):
                                book.Title = series + " - " + title
                        else:
                                book.Title = series
Last Edit: 4 years 2 months ago by malor89.
The administrator has disabled public write access.

Re: malor89's ComicRack Scripts 4 years 2 months ago #35980

  • laxarus
  • laxarus's Avatar
  • Offline
  • Senior Boarder
  • Posts: 66
  • Thank you received: 3
  • Karma: 0
Yeah, it works just as you said. And i don't know how you did it but the "series" field input is so accurate that it is kinda scary even if you consider the different naming structures and languages. A big huge giant thanks for that.
Last Edit: 4 years 2 months ago by laxarus.
The administrator has disabled public write access.
Time to create page: 0.162 seconds

Who's Online

We have 196 guests and 2 members online