Welcome, Guest
Python Scripts for ComicRack

TOPIC: Data Manager 2.xx Series for ComicRack

Data Manager 2.xx Series for ComicRack 11 months 3 weeks ago #46749

  • Evil Night
  • Evil Night's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
From my personal problems it seems to be related to the space character in the tag. Whenever I am manipulating tags or genres Datamanager is replacing every space character with a comma.
cubbyblues84 wrote:
Bumping as a hopeful plea anyone has any ideas here.
cubbyblues84 wrote:
I am having 2 problems I am hoping someone can help with.

1. When adding a tag, it is not allowing me to check if it already exists, and thus is duplicating in a strange way.

<rule field="Series" modifier="Contains" value="Captain America" /> <rule field="Tags" modifier="NotContains" value="Captain America" /> => <action field="Tags" modifier="Add" value="Captain America" />

Run it once... you get:
Captain America

Run it twice, you (strangely) get:
Captain, America, Captain America

2. It is not filling in the DataManager.processed date. Is there any way to put that in a rule?

Thanks in advance for any assistance!
Last Edit: 11 months 3 weeks ago by Evil Night.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 11 months 3 weeks ago #46751

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
Evil Night wrote:
From my personal problems it seems to be related to the space character in the tag. Whenever I am manipulating tags or genres Datamanager is replacing every space character with a comma.

I've made changes to the script that aren't yet tested so i can't give it to you the easy way by uploading a file or script update, but i can point you to the problem and show you the fix

The problem happens in DmClasses.py in the class dmParameters with the function GetList find that function and replace it with this re-written function.
def GetList(self, book, strFieldName):
        if dmGlobals.TraceFunctionMessages: print 'Method: dmParameters:GetList(book, strFieldName)'
        strList = getattr(book, strFieldName)
        if strList == None or strList == '': 
            strList = ''.split(dmGlobals.CRLISTDELIMITER)
        else:
            strList = strList.split(dmGlobals.CRLISTDELIMITER)
        return strList

This should fix the problem

EDIT: on second thought I'm going to upload an update in a few hours containing the script changes I've recommended since the last version.

Merry Christmas
Last Edit: 11 months 3 weeks ago by T3KN0Gh057.
The administrator has disabled public write access.
The following user(s) said Thank You: Evil Night

Data Manager 2.xx Series for ComicRack 11 months 3 weeks ago #46752

  • Evil Night
  • Evil Night's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
That worked perfectly. Thanks so much.

Edit: Just saw your edit thanks for the present, Merry Christmas to you too.
Last Edit: 11 months 3 weeks ago by Evil Night.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 11 months 3 weeks ago #46753

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
jkthemac wrote:
The search function (which I use constantly due to the way my ruleset does multiple jobs so the structure is not simple) no longer allows me to double click on the results to go to the rule.

Make sure you're double clicking on the "Name" column of the rule
Evil Night wrote:
That worked perfectly. Thanks so much.

Edit: Just saw your edit thanks for the present, Merry Christmas to you too.

Official fix now up in repository
Last Edit: 11 months 3 weeks ago by T3KN0Gh057.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 10 months 2 weeks ago #46899

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 768
  • Thank you received: 253
  • Karma: 55
Double clicking seems to be good thanks.

On answering another query I notice that list fields still have problems. You can't add a list to a text based field or set the value to the same as a list.

Also the button next to the ruleset that populates from text seems to be broken.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 9 months 3 weeks ago #47025

  • Surfal666
  • Surfal666's Avatar
  • Offline
  • Senior Boarder
  • Posts: 64
  • Thank you received: 4
  • Karma: 2
First of all, Data Manager is brilliance. I wish some of the tools I had at work were as powerful as this. I'd have more hair.

I've got 32,285 books matching this smartlist:
Match All
{
    [Notes] starts with "Scraped metadata from ComicVine [",
    Not [Tags] contains "CVDB"
}

I've got a corresponding rule for Data Manager:
<<Notes.StartsWith:Scraped metadata from ComicVine [>> <<Tags.NotContains:CVDB>> =>

What I want is the action that applies a regex:
(CVDB[0-9]+)
to the Notes field and adds the result to Tags.

How can I do that?
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 9 months 3 weeks ago #47046

  • Surfal666
  • Surfal666's Avatar
  • Offline
  • Senior Boarder
  • Posts: 64
  • Thank you received: 4
  • Karma: 2
The attached ruleset hangs on execution.
Attachments:
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 9 months 3 weeks ago #47060

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
Surfal666 wrote:
First of all, Data Manager is brilliance. I wish some of the tools I had at work were as powerful as this. I'd have more hair.

I've got 32,285 books matching this smartlist:
Match All
{
    [Notes] starts with "Scraped metadata from ComicVine [",
    Not [Tags] contains "CVDB"
}

I've got a corresponding rule for Data Manager:
<<Notes.StartsWith:Scraped metadata from ComicVine [>> <<Tags.NotContains:CVDB>> =>

What I want is the action that applies a regex:
(CVDB[0-9]+)
to the Notes field and adds the result to Tags.

How can I do that?
<action field="Notes" modifier="RegExVarAppend" value="(?<Tags>CVDB[0-9]+)" />

RegExVarAppend tells it to add the captured text (CVDB[0-9]+) to the end of the capture name (Tags)

however i need to make a quick modification in the script to handle lists with this as well, but after i modify it (and upload new script) that's how you'll do it

Edit: having looked into the script it seems I've already set it up to add capture as a new list item

also if RegExVarAppend is used to move or copy text to Multiline fields (Notes, Characters) it will add it to a new line.


Just a guideline:

  • RegExReplace is used to replace text within a single field (single capture and pattern replace)
  • RegExVarReplace is used to replace text in another field with captured text from the specified field (multiple field captures are possible but not pattern replace)
  • RegExVarAppend is used to add text from specified field field to other fields (multiple field captures are possible but not pattern replace)
Last Edit: 9 months 3 weeks ago by T3KN0Gh057.
The administrator has disabled public write access.
The following user(s) said Thank You: Surfal666

Data Manager 2.xx Series for ComicRack 9 months 2 weeks ago #47069

  • Surfal666
  • Surfal666's Avatar
  • Offline
  • Senior Boarder
  • Posts: 64
  • Thank you received: 4
  • Karma: 2
Thanks for the help. I think I've uncovered some bugs though.

If I use the builtin RegExEditor, I end up with datman.fail-1.txt as the result. The validate button remains disabled no matter what I select after highlighting the regex. Running the rule results in a new custom field called 1, with the desired CVDB string in it.

If I edit the dataman.dat directly (i.e. dataman.fail-2.txt), DM fails to load the rules at all.

I am running CR178 with DM771.
Attachments:
Last Edit: 9 months 2 weeks ago by Surfal666. Reason: Additional Info
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 9 months 2 weeks ago #47070

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
Surfal666 wrote:
Thanks for the help. I think I've uncovered some bugs though.

If I use the builtin RegExEditor, I end up with datman.fail-1.txt as the result. The validate button remains disabled no matter what I select after highlighting the regex. Running the rule results in a new custom field called 1, with the desired CVDB string in it.

If I edit the dataman.dat directly (i.e. dataman.fail-2.txt), DM fails to load the rules at all.

I am running CR178 with DM771.

You aren't pressing the apply button

Highlight text to capture, select the field for captured text to append to and press "Apply" THEN validate

Aslo note this process adds the caputure parentesis as well


Highligting the text below, selecting Tags field and hitting apply
CVDB[0-9]+
becomes
(?<Tags>CVDB[0-9]+)
Last Edit: 9 months 2 weeks ago by T3KN0Gh057.
The administrator has disabled public write access.
Time to create page: 0.746 seconds

Who's Online

We have 826 guests and 3 members online