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 3 years 5 months ago #39870

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
burnshroom wrote:
Correct, Library Manager does move files after scraping, my intent would be to move certain files to folders PRIOR to scraping, that way I can scrape only those NEED to scrape files as opposed to scraping ALL files then organizing.

Data Manager manages metadata only. Library Manager is for managing Files.

Nor is Data Manager is a metadata scraper. ComicVine serves that purpose.

Data Manager is meant to add extra metadata using rules that utilize already existing (or non existing) data from book files.

however you can use Data Manager to add a indicator (perhaps in tags as suggested above) based on rules from existing metadata (like filename), and then use library manager to move those files by finding the "indicator' in tag.
Last Edit: 3 years 5 months ago by T3KN0Gh057.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 3 years 4 months ago #40174

  • Gantz
  • Gantz's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
T3KN0Gh057, any news about release of Data Manager 2.0 ?
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 3 years 4 months ago #40177

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
Well I haven't gotten any response from the testers...(one of which is the package maintainer)

so no. not yet.
Last Edit: 3 years 4 months ago by T3KN0Gh057.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 3 years 3 months ago #40278

  • CollectorX
  • CollectorX's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 17
  • Karma: 1
I have a question.
I have a series of comics let's say 12 issues.
I set the 1st format to series but i don't have the rest because it's ongoing.
I want to see a trigger to change the file format to series when I add the new ones.
How can I do this ?
Also what's the sintax for stack edditing.
Last Edit: 3 years 3 months ago by CollectorX.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 3 years 3 months ago #40333

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
CollectorX wrote:
I have a question.
I have a series of comics let's say 12 issues.
I set the 1st format to series but i don't have the rest because it's ongoing.
I want to see a trigger to change the file format to series when I add the new ones.
How can I do this ?
Also what's the sintax for stack edditing.

in a single ruleset:
Rule: Series Is [Insert Series Name]
Rule: Volume Is [Volume]

Action: Format SetValue Series
Action: Count SetValue 12

you can further narrow it down by making other rules
Rule: Series Is Detective Comics
Rule: Volume Is 2011
Rule: Format Is [Leave Blank]

Action: Format SetValue Series
Action: Count SetValue 12
Last Edit: 3 years 3 months ago by T3KN0Gh057.
The administrator has disabled public write access.
The following user(s) said Thank You: 600WPMPO, Kirtai, CollectorX

CR Data Manager - manipulate data based on rules - version 1.2.4 3 years 3 months ago #40434

  • duckpuppy
  • duckpuppy's Avatar
  • Offline
  • Junior Boarder
  • Posts: 39
  • Thank you received: 3
  • Karma: 1
duckpuppy wrote:
In case of series which have a comma in their names, the DataMan changes the comma to ||, due to which it reads the name as two separate series.

e.g. Series like:

Batman, Incorporated
Frankenstein, Agent of S.H.A.D.E.

become:

Batman|| Incorporated
Frankenstein|| Agent of S.H.A.D.E.

I'm seeing this as well in the current version of the plugin. I created a New 52 rule set based on 600's tutorial (with further modifications to bring it up to date), but every time I load the configuration page, anything with a comma gets modified the same way. I can edit them in the text box and update the rule (using the multi-line edit dialog won't work), but I have to remember to do that for every rule with a series containing a comma every time I enter the configuration page.

I'm excited to see v2.0, but in the meantime is there any way to stop this behavior? I have resorted to editing dataman.dat by hand in a text editor so I don't get bit by by this every time I need to tweak some rules. I've even been looking through the code to see where this replacement is happening so I could hopefully comment it out, but I haven't found it yet. Admittedly, I don't know Python very well (but I can at least usually follow the code, and I have had to maintain some legacy Python code at work).
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 3 years 2 months ago #40761

  • Banedon
  • Banedon's Avatar
  • Offline
  • Junior Boarder
  • Posts: 25
  • Thank you received: 3
  • Karma: 1
I was running data manager on a large group of comics this morning (around 2000) as I'm fine tuning some of my rules. At around 661, it stopped progressing. After a bit, I went ahead and cancelled it, and figured I'd try it again.

However, now when I try to run data manager on anything, it gives me an error "One of the temporary files of the Data Manager could not be deleted. Please restart Comicrack."

Well, I've restarted Comicrack a couple of times and continue to get the error. Not sure where these temp files are stored. Any advice?
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 3 years 2 months ago #40772

  • T3KN0Gh057
  • T3KN0Gh057's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 407
  • Thank you received: 114
  • Karma: 27
duckpuppy wrote:
duckpuppy wrote:
In case of series which have a comma in their names, the DataMan changes the comma to ||, due to which it reads the name as two separate series.

e.g. Series like:

Batman, Incorporated
Frankenstein, Agent of S.H.A.D.E.

become:

Batman|| Incorporated
Frankenstein|| Agent of S.H.A.D.E.



I'm seeing this as well in the current version of the plugin. I created a New 52 rule set based on 600's tutorial (with further modifications to bring it up to date), but every time I load the configuration page, anything with a comma gets modified the same way. I can edit them in the text box and update the rule (using the multi-line edit dialog won't work), but I have to remember to do that for every rule with a series containing a comma every time I enter the configuration page.

I'm excited to see v2.0, but in the meantime is there any way to stop this behavior? I have resorted to editing dataman.dat by hand in a text editor so I don't get bit by by this every time I need to tweak some rules. I've even been looking through the code to see where this replacement is happening so I could hopefully comment it out, but I haven't found it yet. Admittedly, I don't know Python very well (but I can at least usually follow the code, and I have had to maintain some legacy Python code at work).


search for Replace(",","||") and remove the entire line it appears on (there are two instances i believe)
Last Edit: 3 years 2 months ago by T3KN0Gh057.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 3 years 2 months ago #40786

  • duckpuppy
  • duckpuppy's Avatar
  • Offline
  • Junior Boarder
  • Posts: 39
  • Thank you received: 3
  • Karma: 1
I don't see that anywhere in the code. I'm trying to edit the live plugin code in AppData\Roaming\cyo\ComicRack\Scripts\CR Data Manager, and the only instance of '||' in any of the .py files is in dataMan.py:151, and that's in a comment about changing the delimiter from ',' to '||'. I tried searching for all occurrences of "replace" (case insensitive), and don't really see anything that jumps out at me as the culprit.

There's an entry in dataMan.ini that is used to set self.listDelimiter to '||' in dmparser.py, but there's no usage of listDelimiter that jumps out at me either - it's just being used to split the appropriate value strings apart.

According to the comment at the top of dataMan.py, I'm using "r 219 (1.2.4)" (and the plugin UI seems to bear that out).

I can probably be patient enough to wait until 2.0 is ready - keeping the New 52 lists updated by hand isn't a problem, and that's the biggest thing I care about right now. I can wait to do some of the more intricate rules I have in mind.
Last Edit: 3 years 2 months ago by duckpuppy.
The administrator has disabled public write access.

CR Data Manager - manipulate data based on rules - version 1.2.4 2 years 10 months ago #41620

  • duckpuppy
  • duckpuppy's Avatar
  • Offline
  • Junior Boarder
  • Posts: 39
  • Thank you received: 3
  • Karma: 1
I decided to tackle this again, and I think I finally found the problem. Special thanks goes out to the developers of ILSpy - excellent CLR disassembler.

In crdmcgui.DataManagerContainer.IdentifyLineType(), there's no if statement that identifies "#@ VERSION " lines. Thus, this method will never return LineParseType.VersionLine

In crdmcgui.DataManagerCollection.Parse(), there's this code
	int num = 0;
	if (DataManagerContainer.IdentifyLineType(masterRules[num]) != LineParseType.VersionLine)
	{
		this._version = new Version("1.1.0.0");
	}
	else
	{
		string version = masterRules[num].Replace("#@ VERSION ", "") + ".0";
		this._version = new Version(version);
		num++;
	}

The first if statement will always be true, since the IdentifyLineType() function will never return LineParseType.VersionLine and so the version will be assumed to be "1.1.0.0" regardless of what is in the .dat file.

In DataManagerParameters.Parse(), we have this code:
	if (version < new Version("1.2.0.0") && Global.MultiParamKeyModifiers.Contains(this.Modifier))
	{
		this.Value = this.Value.Replace(",", Global.DELIMITER);
	}

This will always be true, since the earlier code would have assumed a version of "1.1.0.0", meaning that the conversion of commas to "||" will trigger every time regardless of the version string in the .dat file.

Simple fix - make IdentifyLineType() actually identify the "#@ VERSION " line as a VersionLine and the problem is gone.
The administrator has disabled public write access.
Time to create page: 0.247 seconds

Who's Online

We have 195 guests and 5 members online