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 2 years 4 weeks ago #43769

  • kingfenix
  • kingfenix's Avatar
  • Offline
  • Junior Boarder
  • Posts: 21
  • Karma: 0
No need for sorries, I hope you are ok and doing better. I can help test things if you like, Im also a programmer so I should understand the lingo.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 2 years 4 weeks ago #43771

  • duckpuppy
  • duckpuppy's Avatar
  • Offline
  • Junior Boarder
  • Posts: 39
  • Thank you received: 3
  • Karma: 1
Take your time, and get better before stressing too much over this plugin.

Github is a good alternative to Google Code. It's different, but it has an issue tracker, wiki, and release management/downloads. If you want some help moving to Github, just let me know. I have several repositories on there right now. I actually kinda want to advocate for a ComicRack Github organization to keep things like data manager rules and other types of things together in one spot. Orgs are free accounts, as long as everything is kept public (so, probably not for the actual ComicRack source).

I've got 15 years of real-world programming experience - if you need testers, I'm game. I'm kinda notoriously (at least to my friends) not a fan of python, but I'll do what I can (and I do know some .NET). I did reverse-engineer (by decompiling) the Data Manager GUI to fix the bug with series having commas in the title, so I have already done some digging in the existing codebase.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 2 years 4 weeks ago #43776

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
duckpuppy wrote:
I've got 15 years of real-world programming experience - if you need testers, I'm game. I'm kinda notoriously (at least to my friends) not a fan of python, but I'll do what I can (and I do know some .NET). I did reverse-engineer (by decompiling) the Data Manager GUI to fix the bug with series having commas in the title, so I have already done some digging in the existing codebase.

you know, you didn't have to do that the code that released was/is available at google code (til it shuts down completely) under crdmgui, but that was nice work nonetheless.

I was already thinking about having a branch of the repository for hosting Data Manager Rule snippets (that could be imported into a larger Ruleset Collection.
Last Edit: 2 years 4 weeks ago by T3KN0Gh057.
The administrator has disabled public write access.
The following user(s) said Thank You: rmagere

CR Data Manager - manipulate data based on rules - version 1.2.4 2 years 4 weeks ago #43779

  • duckpuppy
  • duckpuppy's Avatar
  • Offline
  • Junior Boarder
  • Posts: 39
  • Thank you received: 3
  • Karma: 1
Honestly... I never found the GUI code. I dug through the python code quite a bit, but the repo I was looking at didn't have any of the GUI code (code.google.com/p/cr-data-manager/source). It actually isn't that hard to decompile .NET, so I didn't look too long.
The administrator has disabled public write access.

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

  • jetsman
  • jetsman's Avatar
  • Offline
  • Junior Boarder
  • Posts: 21
  • Thank you received: 4
  • Karma: 2
T3KN0Gh057 wrote:
duckpuppy wrote:
I've got 15 years of real-world programming experience - if you need testers, I'm game. I'm kinda notoriously (at least to my friends) not a fan of python, but I'll do what I can (and I do know some .NET). I did reverse-engineer (by decompiling) the Data Manager GUI to fix the bug with series having commas in the title, so I have already done some digging in the existing codebase.

you know, you didn't have to do that the code that released was/is available at google code (til it shuts down completely) under crdmgui, but that was nice work nonetheless.

I was already thinking about having a branch of the repository for hosting Data Manager Rule snippets (that could be imported into a larger Ruleset Collection.

I would be very interested in that.......I'm not the greatest at making my own rules sets that actually work.....;)
The administrator has disabled public write access.

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

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
<Bug Report> \n mishandling in Regex Replace

The Regex replace function seems to deal with \n incorrectly..

If for example you try and append fields with another field for example append Summary with Notes, the field gets added with every linebreak replaced by a literal backslash then an n.

Also if you try a regex replace with a \n you end up with the literal string and not the new line.

I was going to write a rule set that appends data like Tags into the notes field allowing a backup of data into XML files but in order to do this I wanted to backup one text field by appending it to another. This won't work with this limitation because it is very tricky to get the data back into tags without this functionality messing up fields.
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 #45122

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
While I am thinking about limitations, it would be really great if we could have increased flexibility for Custom fields. For example being able to use {Custom:Concept} or {Concept} in fields, and a proper ability to use regex replace in the same way as normal fields. This would make a lot of data backup strategies possible.
The administrator has disabled public write access.

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

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
I'll look into the error and examine your suggestion soon. Shouldn't be to hard to fix and implement.

However, I believe the way I've set it up if you use a field that isn't standard or handled it considers it a custom field, and handles it as such. That's why the combo box has been modified to accept text entry as well. You should be able to use any custom field name the same manner as you use standard field names across the board. Just use the custom field name (and only the custom field name) anywhere you would use the standard field names and it should handle as you want it to.

I realize version 2.0 hasn't been explained at all so let me point out some critical changes.

1) Custom Fields are automagically detected when used anywhere a field name is accepted, and handled as such.
RegExVarReplace/RegExVarAppend Example:

(?<Stupid>Yes)
Will create/edit Custom Field "Stupid" and give it a Regex matched value of "Yes" 

SetValue Example:

ScanInformation SetValue {Stupid}
Will set ScanInformation value to the Value of the CustomField "Stupid"
2) Actions can be added without having a rule (making it execute by default on all items that make it to the statement
3) Groups can have filter Rules to make execution quicker (if the Comic doesn't meet the group filter the group is skipped)
4) Groups can have default actions (every comic that meets the group rules will execute the default actions).
5) Literals must be specified as such in text type fields
Current handled literals : 

{newline}
{tab}

curly braces must be used

example:    BookNotes SetValue {ScanInformation}{newline}{BookStore}

sets the value of BookNotes to :
      [ScanInformation.Value]
      [BookStore.Value] 

6) RegExReplace will handle only the field specified. If you need to move ifo from one field to another use RegExVarReplace (to set value of multiple fields from a determined field) and RegExVarAppend (to append info from one field to multiple fields)

Those explanations should enable you to do the things you specified

Edit: just realized while testing that the option to use {[CustomFieldName]} is detached in the source code therefore doesn't work fix will be done soon and version 2.01 will be uploaded soon.

Version 2.01 is here!
Does all of the things above as it should.
Also fixes comma replacing error earlier reported.
Note: This version replaces your current Data Manager Plugin and is incompatible with any version below 1.2.4


Download it from Mediafire
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 #45163

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
Thanks for this, will enjoy having filters for groups, that will really help make things more programatic.

However I seem to have spotted a bug off the bat see Here because I posted it to the wrong thread!

Also Null matches seem to be broken. Has the check for a field containing nothing changed?
{ Actually it may just be lists that can no longer match Null as in <<Tags.Is:>> wont match an empty Tag list, same with Characters etc}
{{Indeed further investigation suggests that Not Null on a list will always return true even when the list is empty}}
{{{And the lists can no longer be used as variables ie <<Notes.SetValue:{Tags}>> hangs the system. Presumably there is a pointer issue with lists.}}}

And you are going to wish you never started this because now I don't seem to be able to do some regex replaces with a braket without hanging the system at Processing 0 of 1 books.

For example the regex replace (.*)||$1 or even (.*)||x both hang the system, presumably assigning the $1 variable in regex is confusing something

Group Filters also seem to hang the system.

Less problomatic but odd, it is adding spurious spaces after every ruleset name in the tree?
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 #45168

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
Working on fixes.

Need you to be more specific on this
Less problomatic but odd, it is adding spurious spaces after every ruleset name in the tree?

Also:
And you are going to wish you never started this because now I don't seem to be able to do some regex replaces with a braket without hanging the system at Processing 0 of 1 books.

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.
Last Edit: 1 year 8 months ago by T3KN0Gh057.
The administrator has disabled public write access.
Time to create page: 0.346 seconds

Who's Online

We have 208 guests and 5 members online