Welcome, Guest
Python Scripts for ComicRack

TOPIC: Data Manager 2.xx Series for ComicRack

Data Manager 2.xx Series for ComicRack 1 year 11 months ago #46035

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
Its important to note that r718 won't fix previously noted problem. You'll have to manually edit the dataman.dat file and remove any atmarks ('@') from GroupNames or Comments, once you can open it in the editor its safe to re-add the atmarks and save. The new save will be xml and not suffer the same problem.

EDIT: Ok its 2 minutes to midnight, I have about 4 more hours of coding to do (streamlining & cleaning up code & checking that i didn't mess anything else up) but I'm tired so I'll upload tomorrow.

EDIT: r718 is now up on first page
Last Edit: 1 year 10 months ago by T3KN0Gh057.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46041

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 784
  • Thank you received: 267
  • Karma: 56
DataManager2-03-01r718.crplugin still has a problem with the filters and defaults causing a total halt. For example if you make a Group Rule for Publisher and the book you conduct the rule-set on is not from that Publisher it hangs at 0 of 1 books.

Adding to list based fields like Tags still hangs the process.
Last Edit: 1 year 10 months ago by jkthemac.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46044

  • CADScott
  • CADScott's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
r718 is working well for me so far. I did a fresh install of Comicrack on my new PC, and everything I have tried seems to work well.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46045

  • CFry
  • CFry's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Using R718 and it's trimming values so you can no longer replace something like ": " (2 spaces) with ": " (single space)

Also is there any way to compare fields? Like if the Title and Alternate Title are the same, clear the Alternate Title?
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46046

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
CFry wrote:
Using R718 and it's trimming values so you can no longer replace something like ": " (2 spaces) with ": " (single space)

Will fix this in next release.
Also is there any way to compare fields? Like if the Title and Alternate Title are the same, clear the Alternate Title?

Rule:
Title Is {AlternateTitle}
OR
AlternateTitle Is {Title}
Action:
AlternateTitle SetValue

Note: you can also check to see if Alternate Title is in part of the Title like so
Rule:
Title Contains {AlternateTitle}

using curly braces with field names always is how you reference the [current] value of other fields in the value portion of a Rule or Action
jkthemac wrote:
DataManager2-03-01r718.crplugin still has a problem with the filters and defaults causing a total halt. For example if you make a Group Rule for Publisher and the book you conduct the rule-set on is not from that Publisher it hangs at 0 of 1 books.

Adding to list based fields like Tags still hangs the process.

You must be doing something in your RSCollection that i haven't anticipated because it runs fine for me under those circumstances if you would send me a copy of your dataman.dat (rename it to (dataman.txt and upload here)
Last Edit: 1 year 10 months ago by T3KN0Gh057.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46047

As always, appreciate your work... Here are a few things I have noticed.

1. The filters do not seem to be working. It hangs as previously reported for the negative case. Below is simple example, where I would expect only Marvel Series that start with A to have the format change to TEST.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<collection version="2.3.1">
<group name="Marvel">
<filtersanddefaults rulesetmode="AND">
<rule field="Publisher" modifier="Is" value="Marvel" />
</filtersanddefaults>
<group name="Test">
<filtersanddefaults rulesetmode="AND" />
<ruleset rulesetmode="AND">
<rule field="Series" modifier="StartsWith" value="A" />
<action field="Format" modifier="SetValue" value="TEST" />
</ruleset>
</group>
</group>
<disabled name="Disabled" comment="Disabled Groups and Rulesets">
<filtersanddefaults rulesetmode="AND" />
</disabled>
</collection>

2. I removed both the old Data Manager and the new one, and reinstalled the new one. It keeps on pulling dataman.dat from somewhere in the bowels of my computer. Is this expected behavior?

3. Your suggestion of removing the '@' from the dataman.dat worked fine. When does it convert it to the XML?
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46051

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
cubbyblues84 wrote:
As always, appreciate your work... Here are a few things I have noticed.

1. The filters do not seem to be working. It hangs as previously reported for the negative case. Below is simple example, where I would expect only Marvel Series that start with A to have the format change to TEST.

2. I removed both the old Data Manager and the new one, and reinstalled the new one. It keeps on pulling dataman.dat from somewhere in the bowels of my computer. Is this expected behavior?

3. Your suggestion of removing the '@' from the dataman.dat worked fine. When does it convert it to the XML?

#1 Guess it requires more attention. I'll look into it of course.
#2 Look in your Documents folder for a folder called Data Manager default profile is duplicated here on save for safety when upgrading) this is used for recovery for unlikely event of losing your config
#3 Whenever you save with the config editor.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46052

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 784
  • Thank you received: 267
  • Karma: 56
T3KN0Gh057 wrote:

#1 Guess it requires more attention. I'll look into it of course.

My test ruleset was slimmed down to the max. It is just a simple filter for publisher and a simple rule to place a reference in a field:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<collection version="2.3.1">
  <group name="Marvel">
    <filtersanddefaults rulesetmode="AND">
      <rule field="Publisher" modifier="Is" value="Marvel" />
    </filtersanddefaults>
    <ruleset name="Shorten " rulesetmode="AND">
      <rule field="Series" modifier="Contains" value="X-Men" />
      <action field="BookNotes" modifier="SetValue" value="X-Men" />
    </ruleset>
  </group>
  <disabled name="Disabled" comment="Disabled Groups and Rulesets">
    <filtersanddefaults rulesetmode="AND" />
  </disabled>
</collection>

This hangs for any book that is not published by Marvel.

Note my earlier test was adding the string to 'tags' and that hung even on books that matched the inner rule so adding to tags is also broken.
    <ruleset name="Shorten " rulesetmode="AND">
      <rule field="Series" modifier="Contains" value="X-Men" />
      <action field="Tags" modifier="Add" value="X-Men" />
    </ruleset>
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46054

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
God! python is such a unkempt language tracing errors is a pain in the ass. It doesn't stop on the error it stops either on the first exemption catch or the at the program execution point.

So I found one error (completely my fault) I left out a single line [strReport = ''] and because of that it completely aborts execution when it tries to return a value that doesn't exist (it exist under all circumstances except failure to meet conditions set by rules because if it fails to meet criteria then nothing else is done in that function, so when ending the function it finds no "strReport" variable and because of that the entire script stops.

still investigating list error

Edit: Modifying, and accessing list items is fixed now. Once again python is a pain in the ass, the problem was a simple indentation mistake.

All these error I don't make in csharp for 2 reasons:
  1. Since CSharp uses curly braces inside functions to cordon off block statements once i close a curly brace the indentation is automatically set. In python you have to pay close attention to what you're doing at all times because there is nothing to denote start and finish of a block statement, python aficionados say this leaves the language clean, i say it leaves a mess for anyone trying to use it
  2. I have intellisense with CSharp to point out my errors as they are made so no errors get left behind except handling errors. With python since the language is so open (and i understand that's what makes it so powerful in most cases) there's no way the language itself will ever know if you made a mistake until it runs into it during execution, and then unless you have a exception catch right were it occurs tracing it down pretty much means stepping through every single line of your code to find it

I hate python, i really do. I hate it but i respect what its trying to do. And I continue to use it because it's a challenge, it keeps my mind exercised, but even too much exercise can mess you up. Ask any weightlifter with a prolapsed anus...

Edit 2:CFry wrote:
Using R718 and it's trimming values so you can no longer replace something like ": " (2 spaces) with ": " (single space)

This is no longer a problem when using xml. however the next version (hitting the repository in the next 15 minutes) will import your old profiles without stripping spaces
Last Edit: 1 year 10 months ago by T3KN0Gh057.
The administrator has disabled public write access.
The following user(s) said Thank You: docdoom

Data Manager 2.xx Series for ComicRack 1 year 10 months ago #46056

  • CFry
  • CFry's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
I've tried this a few ways now and can't get it to hit. The actual field is Alternate Series.
|<<Title.Contains:{AlternateSeries}>> <<Series.Contains:{AlternateSeries}>> => <<AlternateSeries.SetValue:>>

An example would be a title of "Exiled Part Two" and Alternate Series of Exiled.
The administrator has disabled public write access.
Time to create page: 0.280 seconds

Who's Online

We have 173 guests and 3 members online