Welcome, Guest
Python Scripts for ComicRack

TOPIC: Duplicates Manager (v Alpha - 0.6)

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12134

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
To start, +1 karma for our old man right away for the effort..!!! :cheer:
doolittle wrote:
When I have this installed, it causes the Series Info Panel plug-in to break and display code instead of metadata. Any ideas on why that would happen? Has it happened to anyone else?
Confirmed here on my machine too.. :(

Here is the ugly code..

Warning: Spoiler! [ Click to expand ]


Now, that done, I have been learning how to use the script. Here is my current dmrules.dat file:
filename    keep    Minutemen
filename    keep    Last Kryptonian-DCP
covers      keep    all
pagecount   keep    largest
pagecount   keep    c2c
While I do not know if that rules file is correct or not.. here is what I get when I use this..



I know I have to do the UserConfiguration for the script to actually move/delete comics, but I can simply not understand how will it impact the duplicates in my comics.

This is a difficult script.. :(

p.s. I would love to see some demo dmrules.dat files, especially the ones used by forkicks, as he seems to have decoded this quite perfectly!
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
Last Edit: 6 years 9 months ago by 600WPMPO.
The administrator has disabled public write access.

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12136

  • doolittle
  • doolittle's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 16
  • Karma: 0
600WPMPO wrote:
To start, +1 karma for our old man right away for the effort..!!! :cheer:

Always! The coders here are the greatest people on Earth!

600, thanks for confirming I wasn't bunging this up myself. I was going crazy.
"i aim to misbehave."
The administrator has disabled public write access.

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12137

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
doolittle wrote:
When I have this installed, it causes the Series Info Panel plug-in to break and display code instead of metadata. Any ideas on why that would happen? Has it happened to anyone else?

This is an easy one with solution well known because it has happened before... my bad :blush: . I will solve it later today!
The administrator has disabled public write access.
The following user(s) said Thank You: doolittle

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12138

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
600WPMPO wrote:
While I do not know if that rules file is correct or not.. here is what I get when I use this..



I know I have to do the UserConfiguration for the script to actually move/delete comics, but I can simply not understand how will it impact the duplicates in my comics.

This is a difficult script.. :(

Yes, I know it is difficult... but it is also very customizable :P . This is the best I could think of, really, to address so many different expectations. At the beggining it seems very time consuming, but once you get to know the beast...

Now, to your problem... The script records all its actions in the file C:\__dupes__\logfile.log (if you did not change the DUPESDIRECTORY variable). It is a plain text file. I will tell you step by step what each of your rules would do to your comics.

Now, on to other thing...
600WPMPO wrote:
filename    keep    Minutemen
filename    keep    Last Kryptonian-DCP
covers      keep    all
pagecount   keep    largest
pagecount   keep    c2c

Careful with the second rule... The program reads that as "filename keep Last".... it only gets one word (possible enhancement here for the script...), so you would be better off doing this instead
filename    keep    Kryptonian

Cheers! :)
The administrator has disabled public write access.

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12139

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
A note of caution here!

If you use the rule
pagecount keep c2c

and you have comic "XXXXX (1 page)" and comic "XXXXX (28 pages)", this would wrongly remove the real c2c and leave the 1 pager... This is logged in the script site for fixing and adding a new rule like 'pagecount remove one'... (see issue)
The administrator has disabled public write access.

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12140

  • forkicks
  • forkicks's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 871
  • Thank you received: 109
  • Karma: 37
600WPMPO wrote:
Now, that done, I have been learning how to use the script. Here is my current dmrules.dat file:
filename    keep    Minutemen
filename    keep    Last Kryptonian-DCP
covers      keep    all
pagecount   keep    largest
pagecount   keep    c2c

I don't use the info panel, hence not picking up on the problem posted. BUT, i do have a question, perezmu specifically mentioned you can't have spaces on the rules, and Last Kryptonian-DCP has a space, therefore making that line count as 4 arguments instead of 3. Doesn't this break the rule parsing? Does the script handly this gracefully?

(edit)
This is what happens when you post before your morning coffee. You tend to miss replies. Perezmu already picked up and clarified my questions.

fK
Last Edit: 6 years 9 months ago by forkicks. Reason: Blind poster
The administrator has disabled public write access.

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12141

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
(edit)
Man, I was faster than you...!
(edit)

forkicks wrote:
I don't use the info panel, hence not picking up on the problem posted. BUT, i do have a question, perezmu specifically mentioned you can't have spaces on the rules, and Last Kryptonian-DCP has a space, therefore making that line count as 4 arguments instead of 3. Doesn't this break the rule parsing? Does the script handly this gracefully?

It simply skips from the third word on... so, since it would read that line as:
filename    keep    Last
which is a valid rule, so it would keep going... My sugestion was to change that to:
filename    keep    Kryptonian
which is 'safer' (last is a more common word that can be found in the filename of other comics more easily).

Would you guys have me change this behaviour and halt on lines with too many arguments?
Last Edit: 6 years 9 months ago by perezmu.
The administrator has disabled public write access.

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12142

  • forkicks
  • forkicks's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 871
  • Thank you received: 109
  • Karma: 37
Perphaps a warning to the user that a line in the rules is not constructed properly would be the safest way, so that the user doesn't come up with unexpected behaviour.

By the way, AMAZING work on the wiki for this.

fK
The administrator has disabled public write access.

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12143

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
forkicks wrote:
Perphaps a warning to the user that a line in the rules is not constructed properly would be the safest way, so that the user doesn't come up with unexpected behaviour.

By the way, AMAZING work on the wiki for this.

fK

Yes, I will do that. Thanks on the wiki thing... feel free to contribute at any time!
The administrator has disabled public write access.

Re: Duplicates Manager (v Alpha - 0.1) 6 years 9 months ago #12145

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
Finally I got the time to test this out thoroughly.. :evil:

I made 3 dummy cbz files, and named them as follows:



Now, I made the dmrules.dat file with this code:
filename    keep    Scanner-X
covers      keep    all
pagecount   keep    largest

Next, I modified the constants.py with these settings:



Fingers crossed, i ran the script, and let it do its thing



The result was that it placed the 2 duplicate files into the dump folder (zzzArchives, in my case):



Now, here is what troubles me:

I always prefer Scanner-X. No matter what. No matter if he doesn't give me variant covers, or c2c. So, that is my master choice, I would always like to save Scanner-X's books.

Secondly, I always prefer multiple covers over c2c files.

As you would see, the dmrules.dat file above lists these rules in the order I wish. However, I end up losing my preferred scanner and losing the file with the most covers.

Help me grand-daddy!!! :laugh:
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
Last Edit: 6 years 9 months ago by 600WPMPO.
The administrator has disabled public write access.
Time to create page: 0.246 seconds

Who's Online

We have 196 guests and 2 members online