Welcome, Guest
Python Scripts for ComicRack

TOPIC: Data Manager 2.xx Series for ComicRack

Data Manager 2.xx Series for ComicRack 10 months 1 week ago #46649

  • laxarus
  • laxarus's Avatar
  • Offline
  • Senior Boarder
  • Posts: 66
  • Thank you received: 3
  • Karma: 0
Hmm, I just tried but couldn't make it work.
What I want to do is, take the data from a custom field that is named as "English Title" and add it to the "Characters".

The DM code is below
=> <action field="Characters" modifier="Add" value="{English Title}" />
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 10 months 1 week ago #46663

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 760
  • Thank you received: 248
  • Karma: 55
laxarus wrote:
Hmm, I just tried but couldn't make it work.
What I want to do is, take the data from a custom field that is named as "English Title" and add it to the "Characters".

The DM code is below
=> <action field="Characters" modifier="Add" value="{English Title}" />


=> <<Characters.Add:{English Title}>>




Are you definitely using the most recent version?
Last Edit: 10 months 1 week ago by jkthemac.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 10 months 1 week ago #46664

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 760
  • Thank you received: 248
  • Karma: 55
Actually it doesn't like it when you try and use the populate button without a rule so try this

<<Publisher.Is:new>> => <<Characters.Add:{English Title}>>

then delete the rule manually with remove and also edit the text. Or just insert the Action manually with the Add button as it is in my picture.

#This is clearly a bug#
Last Edit: 10 months 1 week ago by jkthemac.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 10 months 1 week ago #46688

  • Xelloss
  • Xelloss's Avatar
  • Online
  • Platinum Boarder
  • Posts: 386
  • Thank you received: 101
  • Karma: 21
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!

Although it isn't a fix for your problem, you gave me the idea for this script that can help you with at least to fix the comics you have this mistake made with...

File Attachment:

File Name: deletedupl...crplugin
File Size:1 KB


This Automation script search for tags, characters, teams and Locations duplicated in each comic it is applied to, and delete them.

It is still beta, so use it under your own risk... (I used it with my 80k+ comics and I haven't found any problem yet)

To use it, just install, select the comics you want to apply the fix, right botton -> automatation -> Delete Duplicate Tags and wait a few seconds depending in the number of comics (80k+ comics took about 3 seconds to complete)

When finished you can see in the debug console the number of comics modified.

note: It is case sensitive... so Spider-Man is not the same tag as spider-man. I keep it that way as tags can use special characters and capitals to differentiate
Last Edit: 10 months 1 week ago by Xelloss.
The administrator has disabled public write access.
The following user(s) said Thank You: cubbyblues84

Data Manager 2.xx Series for ComicRack 10 months 5 days ago #46703

  • DodgyEmu
  • DodgyEmu's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
Whenever I try to use a numerical field like 'Year' as part of a text field, DM hangs.
Example:
<rule field="StoryArc" modifier="Is" value="" /> => <action field="StoryArc" modifier="SetValue" value="{Year} {Month}" />

Is there any way to turn the value of a numerical field into a string for use in text fields?
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 10 months 5 days ago #46706

  • Xelloss
  • Xelloss's Avatar
  • Online
  • Platinum Boarder
  • Posts: 386
  • Thank you received: 101
  • Karma: 21
Try using:

'AddedTimeAsText'
'AlternateCountAsText'
'AlternateNumberAsText'
'BlackAndWhiteAsText'
'BookPriceAsText'
'BookmarkCountAsText'
'CommunityRatingAsText'
'CountAsText'
'CoverArtist'
'CoverAsText'
'DayAsText'
'EnableProposedAsText'
'FileCreationTimeAsText'
'FileModifiedTimeAsText'
'GetYesNoAsText'
'HasBeenReadAsText'
'IsLinkedAsText'
'LastPageReadAsText'
'MapPropertyNameToAsText'
'NewPagesAsText'
'NumberAsText'
'OpenedCountAsText'
'OpenedTimeAsText'
'PagesAsText'
'ProposedCountAsText'
'ProposedNakedVolumeAsText'
'ProposedNumberAsText'
'ProposedVolumeAsText'
'ProposedYearAsText'
'PublishedAsText'
'ReadPercentageAsText'
'ReleasedTimeAsText'
'SeriesCompleteAsText'
'ShadowCountAsText'
'ShadowNumberAsText'
'ShadowVolumeAsText'
'ShadowYearAsText'
'VolumeAsText'
'WeekAsText'
'YearAsText'
'YesRightToLeftText'

Instead of the simple fields

They are values already converted to strings in the CR database...

I have replaced my DM rules with my own python scripts (as I found them a lot more configurable) so I don't experiment much with this script, I don't know if it can read these fields inside the book objetc... but teorically it should... (I can't try it right now, but I will when I am at home)
Last Edit: 10 months 5 days ago by Xelloss.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 10 months 4 days ago #46710

  • DodgyEmu
  • DodgyEmu's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
I tried this, but they aren't recognised. It just leaves the field blank.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 10 months 4 days ago #46711

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
This may help

Data Manager is capable of recognizing all attributes of a ComicRack book, you just need to edit the "dataman.ini"

definition of useful values in dataman.ini
allowedKeys - These are attributes that are recognized as READABLE values in a comicrack book any book attribute not listed will not be recognized as a readable value in Data Manager.

allowedValues - These are attributes that are recognized as WRITEABLE values in a comicrack book any book attribute not listed will not be recognized as a writeable value in Data Manager.

stringKeys - attributes that contain textual values

numericalKeys - attributes that contain numeric values

pseudoNumericalKeys - attributes that expect numeric values but can contain supplemental values (i.e. : 1A)

boolKeys - attributes that can only contain a true or false value

yesNoKeys - attributes that contain a yes, no or unknown value

multiValueKeys - attributes that should be handled as lists (they are actually just plain text values seperated by commas)

so in order to add a KNOWN attribute to DataManager you need to add it to at least 2 places in the dataman.ini

i.e

to add "AddedTimeAsText"

you would add it to stringKeys (since its a textual value) then add it to allowedKeys

this makes this Attribute READONLY in Data Manager


NOTE: Any attributes not appropriately setup in dataman.ini will redirect to custom attributes/fields when referenced in Data Manager. This is because Data Manager needs to know how to handle the attributes values.

It is also important to know which attributes CAN be written before adding them as WRITEABLE values
Last Edit: 10 months 4 days ago by T3KN0Gh057.
The administrator has disabled public write access.
The following user(s) said Thank You: Xelloss

Data Manager 2.xx Series for ComicRack 10 months 4 days ago #46712

  • DodgyEmu
  • DodgyEmu's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
That worked perfectly, thanks.
The administrator has disabled public write access.

Data Manager 2.xx Series for ComicRack 10 months 4 days ago #46714

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 760
  • Thank you received: 248
  • Karma: 55
You can add a text field with numerical values without having to modify the script.

So you could just clear the field and then add the number:

<<Series.Is:Mighty Thor>> => <<BookNotes.SetValue:>> <<BookNotes.Add:{Number}>>


Ignore that it doesn't appear to work for dates. As you were.
Last Edit: 10 months 4 days ago by jkthemac.
The administrator has disabled public write access.
Time to create page: 0.206 seconds

Who's Online

We have 196 guests and 4 members online