Welcome, Guest
Python Scripts for ComicRack

TOPIC: CR Data Manager - manipulate data based on rules - version 1.2.4

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45173

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
T3KN0Gh057 wrote:
Working on fixes.

Need you to be more specific on this

When I load up this version and start using my default profile I am aware the vesion edits the profile to make it compatible. But one of the things it seems to do is place space at the end of every rule so if I had a folder for DC and a ruleset for Gotham it would become "Gotham<Space><Space><Space><Space>" can't remeber how many because I edited them all. I think it is all of the space between the name and the @ marker but I didnt count.

T3KN0Gh057 wrote:

If the button reads "Close" and not "Cancel" the process completed, Check whether or not the info has been changed in your comic. For some reason its not tracking changes under some circumstances.

No it is hanging with no changes with Cancel.

At present I have deleted the latest version but if you put up another version I will have a play and provide rulesets that cause problems.
Last Edit: 1 year 8 months ago by jkthemac.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45174

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
jkthemac wrote:
No it is hanging with no changes with Cancel.
At present I have deleted the latest version but if you put up another version I will have a play and provide rulesets that cause problems.

I can't reproduce this error, for me it is making the changes.
perhaps you can give me a copy of the .dat file that caused this hang?


maybe its something i fixed while fixing the reporting?
Last Edit: 1 year 8 months ago by T3KN0Gh057.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45175

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
Unfortunately I was getting too many issues with my default profile so I rolled back to the old version. I don't have any dat files right now but as I said above i am more than willing to load up the next version and try again, and provide any dat files that cause this issue for me. I did note that it wasn't every regex causing the issue but I consistantly found a few basic ones that did.

One thing that was causing an issue was sometimes the cancel box wasn't responding and I had to close the window. I think this resulted in either multiple instances running, or a kind of manual memory leak becauase it would radically slow down comicrack after a few times testing various scripts and that made the whole process too slow and tortuous to continue.

By the way I am not sure what the benefit of the Regex variable replace is. You state you can't use multiple field names in a normal regex-replace but I managed to with no issues.

Using custom fileds certainly worked so that was fixed, although the text entry box seemed inconsistant, why did you change it from the old method?
Last Edit: 1 year 8 months ago by jkthemac.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45176

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
jkthemac wrote:
Unfortunately I was getting too many issues with my default profile so I rolled back to the old version. I don't have any dat files right now but as I said above i am more than willing to load up the next version and try again, and provide any dat files that cause this issue for me. I did note that it wasn't every regex causing the issue but I consistantly found a few basic ones that did.

By the way I am not sure what the benefit of the Regex variable replace is. You state you can't use multiple field names in a normal regex-replace but I managed to with no issues.

Using custom fileds certainly worked so that was fixed, although the text entry box seemed inconsistant, why did you change it from the old method?

RegExVarReplace is for when you need to set the value of multiple fields from a single field for instance:
Series is Batman: The Dark Knight

 <<Series.RegexVarReplace:(?<SeriesGroup>Batman): (?<Series>The Dark Knight)

will set Series Group to "Batman" and change the series to "The Dark Knight"

Its something i put in to avoid having to do multiple regex replaces where its easier to get all the information into the fields they need to go in in one go.

you can always use {FieldName} in a RegexReplace to retrieve Info for a field. RegExVarReplace is to SetValues for Multiple fields instead. but you HAVE TO properly capture the fields with FieldNames using "?<FieldName>)"

Or more to the effect of what you are doing
Notes:
Tags: foo, foo1, foo2, foo3
CustomField1: CustomField Text

Notes.RegExVarReplace:^Tags: (?<Tags>.+?)\nCustomField1: (?<CustomFeild1>.+?)$

will  set Tags to: foo, foo1, foo2, foo3
and Custom Field CustomField1 to: CustomField Text
Last Edit: 1 year 8 months ago by T3KN0Gh057.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45177

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
T3KN0Gh057 wrote:
RegExVarReplace is for when you need to set the value of multiple fields from a single field for instance:
Series is Batman: The Dark Knight

 <<Series.RegexVarReplace:(?<SeriesGroup>Batman): (?<Series>The Dark Knight)

will set Series Group to "Batman" and change the series to "The Dark Knight"

Ahhh. I was looking at that the other way around. Makes more sense now, and certainly very efficient.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45178

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
Just to check, I noticed when I loaded the new version I ended up with both existing side by side. I figured that was a potential problem so I uninstalled the older version, but I wonder would it actually cause a problem for testing purposes?
Last Edit: 1 year 8 months ago by jkthemac.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45182

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
it shouldn't cause any problems. I've been using 2.0 (and now 2.02) exclusively, but I started out running 2,0 next to 1.2.4 for testin purposes.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45193

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
Cool I may do that. These things can often conflict.
Does the new version use a seperate default location then? I couldn't see it, but I wasn't looking very hard. I was just pleased when I was able to roll back without messing up my default profile.

BTW this is an example of a rule that totally locks me up everytime and can't even get out with cancel, but which works on 1.2.4:
#@ VERSION 2.1.0
#Created by CR Data Manager GUI 
#Do Not Edit Manually unless you know what you are doing
#@ NAME Notes to Tags @ COMMENT 
<<Notes.Contains:Tags:>> <<Review.Not:>> => <<Review.RegexReplace:^(.*)$||Review:$1:Review>>
#@ END_RULES
# -------------------------------

Of course I can do this without Regex:
<<Review.SetValue:Review:{Review}:Review>>
but clearly something has changed between versions.

This is a little test of group defaults that has odd behaviour (its not logical just a demo):
#@ VERSION 2.1.0
#Created by CR Data Manager GUI 
#Do Not Edit Manually unless you know what you are doing
# -------------------------------
#@ GROUP Test1@ FILTERSANDDEFAULTS <<Publisher.Is:DC>> => 
# -------------------------------
# -------------------------------
#@ GROUP Nested@ FILTERSANDDEFAULTS <<SeriesGroup.Not:Gotham>> => 
# -------------------------------
#@ NAME Test Rule  @ COMMENT 
<<Series.Contains:Wonder Woman>> => <<SeriesGroup.SetValue:Gotham>>
#@ END_GROUP Nested
# -------------------------------
# -------------------------------
#@ GROUP Nested@ FILTERSANDDEFAULTS <<SeriesGroup.Is:Gotham>> => 
# -------------------------------
#@ NAME Test Rule  @ COMMENT 
<<Series.Contains:Wonder Woman>> => <<SeriesGroup.SetValue:Superman>>
#@ END_GROUP Nested
# -------------------------------
#@ END_GROUP Test1
# -------------------------------
#@ END_RULES
# -------------------------------
The rule works on DC comics with Wonder Woman in Series
It always breaks down if SeriesGroup is already set to Gotham
Last Edit: 1 year 8 months ago by jkthemac.
The administrator has disabled public write access.
The following user(s) said Thank You: T3KN0Gh057

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 8 months ago #45196

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
Thanks, that helped me find the problem.
The administrator has disabled public write access.
The following user(s) said Thank You: jkthemac

CR Data Manager - manipulate data based on rules - version 1.2.4 1 year 7 months ago #45249

  • moonwrithe
  • moonwrithe's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Nice work on version 2.01 of this plugin, Ghost! I've finally got a way to set a custom field for alternate covers based on the filename using regex. I couldn't seem to figure it out with the last version.

One small problem I'm experiencing with 2.01: it doesn't seem to be setting the custom field DataManager.processed anymore. It does when I revert to version 1.2.4.
The administrator has disabled public write access.
Time to create page: 0.244 seconds

Who's Online

We have 226 guests and 4 members online