Welcome, Guest
Python Scripts for ComicRack

TOPIC: Priat(Path Reader and InterActive Tagger) V 0.0.9. Bugfix release

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 8 months ago #22140

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
perezmu wrote:
It seems it does not support the "Scan Information" field, right?
Wrong. Scan information is supported, but you have to type it as ScanInformation. That's the name of the property in the ComicBook object. And propertynames are not allowed to have spaces in them. This plugin uses reflection to handle any properties that are in the supported list.
perezmu wrote:
Also, I am experiencing this issue: if a load a previously saved regex, and I modify it in the edit box, changes are not applied in the live preview until the modification is saved.

That's weird. Chances are applied in the list on the txtRegex Change-event. That's fired when the user OR the program changes the text. I can't seem to reproduce this one. I'll need more info.
perezmu wrote:
Some further request (I know I am being annoying, being there, done that ;) ): possibility to remove saved regexps

Nope, you're not annoying. Renaming and removing regexps is planned for a (near) future version, but in the mean time take a look at SavedExpressions.txt file in the plugin directory. I'm sure a brilliant programmer like yourself can figure it out. ;)
Just madly collecting (dutch) comics
The administrator has disabled public write access.

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 8 months ago #22141

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
tcm1998 wrote:
Wrong. Scan information is supported, but you have to type it as ScanInformation. That's the name of the property in the ComicBook object. And propertynames are not allowed to have spaces in them. This plugin uses reflection to handle any properties that are in the supported list.

Great! Thanks!!!! :)
That's weird. Chances are applied in the list on the txtRegex Change-event. That's fired when the user OR the program changes the text. I can't seem to reproduce this one. I'll need more info.

Maybe I am just being stupid and the changes that I am making do not really modify the result :blush: :blush: :blush: ... If this ever comes up again, I'll let you know!
Nope, you're not annoying. Renaming and removing regexps is planned for a (near) future version, but in the mean time take a look at SavedExpressions.txt file in the plugin directory. I'm sure a brilliant programmer like yourself can figure it out. ;)

Just testing you :P :P :P

Thanks again.
The administrator has disabled public write access.

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 8 months ago #22488

  • rmagere
  • rmagere's Avatar
  • Offline
  • Gold Boarder
  • Posts: 223
  • Thank you received: 24
  • Karma: 7
I have installed the latest version of the plugin (2012-04-01) and I get the following error message whenever I try to run it
Exception has been thrown by the target of an invocation
The plugin used to work without any issues - the actions I have taken since the last time it was
  • working have been the following:
  • Installed v54 of comicrack
  • Run comicrack and see priat is not working anymore
  • Installed latest version of priat & restart
  • Still not working
  • Uninstalled latest version of priat & restart
  • Restart again (just in case)
  • Installed latest version of priat & restart
  • Still not working
Would be great if you had any suggestions on what I should try/do next
Last Edit: 5 years 8 months ago by rmagere.
The administrator has disabled public write access.

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 8 months ago #22494

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
It might be the new version of comicrack, since there have been a few essential changes in the plugin dll. I had trouble compiling after upgrading, but I never realised that users might have the same trouble just using the plugin.

I'll have a look at it as soon as I can.

Edit: Problem was that the plugin is statically linked with the comicrack dll's, which cYo changed in version 154. I recompiled, linking to the new dll's and no problem anymore. So, I'll include the new version, but this one is ONLY for people on 154. I'll see if I can come up with some dynamic loader, so the dll-version don't matter that much.
Attachments:
Just madly collecting (dutch) comics
Last Edit: 5 years 8 months ago by tcm1998.
The administrator has disabled public write access.
The following user(s) said Thank You: rmagere

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 8 months ago #22496

  • rmagere
  • rmagere's Avatar
  • Offline
  • Gold Boarder
  • Posts: 223
  • Thank you received: 24
  • Karma: 7
Thank you! I did not expect such a quick reply and fix :D
The updated plugin works without any problem whatsoever - thanks again
The administrator has disabled public write access.

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 7 months ago #22553

  • crnirg
  • crnirg's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Can you help me ?
If i've comics with names likes :

0075 - Zagor - Big Circle.cbr

what regex use to get next :
Number -> 0075
Title -> Zagor - Big Circle
The administrator has disabled public write access.

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 7 months ago #22554

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
I think it should be:
.*\\(?<Number>[^ ]*) - (?<Title>.*)\.cbr

I'll split it up for you
.*\\ (anything before the LAST backslash, basically the complete path should be kept outside the groups.
(?<Number>...) Number capture group
[^ ]* Contents of Number, anything until we get a space
Space-Space Just to make sure the serperate is outside any group
(?<Title>) Title capture group
.* The rest of the characters (providing the last bit matches)
\.cbr A literal dot followed by the extension

You could also write the last bit as:

\.cb(r|z|t|7) which would work for most extensions

Finally, notice the negative character class I use to avoid Number being greedy. If we simply would use .* then Number would get 0075 - Zagor. One alternative would be to make the * lazy like .*? but that would be slower.
Just madly collecting (dutch) comics
Last Edit: 5 years 7 months ago by tcm1998.
The administrator has disabled public write access.
The following user(s) said Thank You: crnirg

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 7 months ago #22564

  • crnirg
  • crnirg's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Finally
.*\\(?<Number>[^ ]*) - (?<Title>.*)\.
is OK
The administrator has disabled public write access.

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 7 months ago #22576

  • tcm1998
  • tcm1998's Avatar
  • Offline
  • Expert Boarder
  • Posts: 94
  • Thank you received: 16
  • Karma: 6
yeah, I thought that would fail if there's a dot in the title, but it won't because of the greedy .* for the titlegroup. Sometimes I get confused by regexps myself, which is why I wrote this plugin in the first place. B)
Just madly collecting (dutch) comics
The administrator has disabled public write access.

Re: New Plugin "Priat" (successor of tags from name with regular expressions) 5 years 6 months ago #23025

  • Yellowbox
  • Yellowbox's Avatar
  • Offline
  • Junior Boarder
  • Posts: 25
  • Thank you received: 10
  • Karma: 3
Ooh, swanky! ComicRack has come a long way since the early days, and it's nice to see enterprising individuals improving on those old scripts that saw dwindling support. Ahem.

Anyways, keep up the good work, friend! I hereby declare this successor to be official!
The administrator has disabled public write access.
Time to create page: 0.228 seconds

Who's Online

We have 249 guests and one member online