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 #12169

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
pescuma wrote:
@ perezmu

Thanks for the very nice script.

Two feature request:

1. When filtering by size, allow an error margin. For example:
filesize keep largest 10%
Meaning that it keeps the largest file and all that have at least 90% of its size

2. Allow to filter by file type: zip, pdf, rar

My problem is that a lot of times I have the same scan with different formats, so I'd like to keep the ones in zip format if they are almost the biggest ones.

Agree on both... could you please open corresponding issues in the google code site?

I am currently adding some margin also to the "pagecount keep noads", because I found that if I have comics with only 1 page (cover only), that will remove all the other dupes, regardless of their page numbers!
The administrator has disabled public write access.

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

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
perezmu wrote:
Agree on both... could you please open corresponding issues in the google code site?

Thanks for doing so. Could you also expand on the filetype filtering? What is it exactly you'd like to achieve? Thanks
The administrator has disabled public write access.

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

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
New version available, v0.5. IMPORTANT BUG FIX (you might want to try this on 600 and let me know)...

There are some improvements, like setting user defined variables in the dmrules.dat file, instead of doing so in the constants.py file. This will is very useful since (i)changes in the variables work without need to restart ComicRack, (ii) I will soon implement profiles, so that different rules will be available.

I cannot update the wiki until tomorrow, I will let you all know ASAP,

Cheers :)
The administrator has disabled public write access.

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

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
Thanks for your work perezmu..

However, just like the last version, it is not working for me.. :-(

It just gives its success message, but neither does it move the files nor does it generate a logfile..

Yes, I have made the MOVEFILES = True and VERBOSE = True, and have input a valid path DUPESDIRECTORY = Path.Combine("D:\\","zzzArchives").
Now Playing: The ComicRack Manual (Online)

See my new comics & gadgets on: Tumblr!
The administrator has disabled public write access.

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

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
The WIKI has been updated as of version 0.5 - It is important to check it, since there is a MAJOR change in the way to set options values
The administrator has disabled public write access.

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

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
600WPMPO wrote:
However, just like the last version, it is not working for me.. :-(

It just gives its success message, but neither does it move the files nor does it generate a logfile..

This is plain weird! I do not know what to do! I really want this to work for you...! Only thing I can think of is:
  1. Set the options using the new way, not the old, this is, add to the dmrules.dat file the following:
    @ MOVEFILES       true
    @ REMOVEFROMLIB   true
    @ VERBOSE         true

  2. Delete your D:\\zzzArchives directory

  3. Run ComicRack in "debug mode":
    ComicRack.exe -dso -ssc
    - to do so, rightclick on the Comicrack shortcut, and in Properties add the
    -dso -ssc
    at the end. If now you launch CR you should see also a text window.

  4. Run the script

  5. If logfile.log was created at your D:\\zzzArchives (has the directory been created?), provide me with it

  6. Copy the contents of the ComicRack debug window and provide me with their contents

Let's see if I can get some info of what is going on now?

Anyone else is having problems with 0.5?

Thanks
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 #12218

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
perezmu wrote:
Set the options using the new way, not the old, this is, add to the dmrules.dat file the following:
@ MOVEFILES       true
@ REMOVEFROMLIB   true
@ VERBOSE         true
:cheer: :cheer: Yes!! maybe this new way has done it.. It is working fine now! +1 karma for the excellent new version!!

Here is the log file..

File Attachment:

File Name: logfile_20...2-15.txt
File Size:3 KB


Now, the sample batch passed, I will test it on a wider selection of comics.

As always, some queries:

With the rules: filename keep Minutemen ahead of covers keep all, will the script always keep minutemen scans (even if they have single cover)? This means I'll lose on the 2 covers archives..

With the new versions, how do you propose we make the script differentiate between, say, Minutemen-Hawaiian Punch and Minutemen-Twiztid Sith? Are we allowed to use the '-' between names or the spaces?
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 #12219

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
600WPMPO wrote:
Now, the sample batch passed, I will test it on a wider selection of comics.
:woohoo: :woohoo: :woohoo: :woohoo: :woohoo: :woohoo: :woohoo: :woohoo: :woohoo: :woohoo:

Man, I am glad! Keep in mind though that new bugs are probably lurking... :P

Ricardo (pescuma) has provide me with a slicker, nicer, cleaner and more efficient parser for the script that addresses one of the main changes I wanted to do, so I can move on as soon as I add his version. This means, sometime next week, a simple windows to modify the options graphically, and support for different rules files (profiles)!
600WPMPO wrote:
With the rules: filename keep Minutemen ahead of covers keep all, will the script always keep minutemen scans (even if they have single cover)? This means I'll lose on the 2 covers archives..

I am not sure I understand your question... 'filename keep Minutemen' keeps all comics with 'Minutemen' and removes the rest. Now, adding 'covers keep all' will keep from the ones left (all of which must already be named with 'minutemen'), the one(s) with most covers. So if you have

xxxx-minutemen.cbz
xxxx-minutemen (2 covers).cbz
xxxx-minutemen (3 covers).cbz
xxxx-dcp
xxxx-dcp (2 covers).cbz

- after rule 1: 'filename keep Minutemen' you have:
xxxx-minutemen.cbz
xxxx-minutemen (2 covers).cbz
xxxx-minutemen (3 covers).cbz

- after rule 2: 'covers keep all' you'd have:
xxxx-minutemen (3 covers).cbz

If instead of 'covers keep all' you do 'covers keep some', you'd have:
xxxx-minutemen.cbz
xxxx-minutemen (3 covers).cbz

since this rule only considers those with the structure '(n covers)' from which keeps the largest ones, and deletes the rest with that structure; but those that do not match '(n covers)' are untouched. This was done so, because if it si unlabelled, we might be deleting some comic with lots of covers...
With the new versions, how do you propose we make the script differentiate between, say, Minutemen-Hawaiian Punch and Minutemen-Twiztid Sith? Are we allowed to use the '-' between names or the spaces?

The way it is now in v0.5 (I hope, I need some more testing, it worked for me though, but I am running out of dupes to test the script on... cannot wait until tomorrow packs!), you can use '-' and ' '... the rule

filename keep word1-word2 word3 word4

would make the script search for the string: "word1-word2 word3 word4", so both of your examples would be completely differentiated. Again, this feature, still needs further test!

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

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

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
perezmu wrote:
..sometime next week, a simple windows to modify the options graphically, and support for different rules files (profiles)
:woohoo: :woohoo: Man.. this is great!! Eagerly awaiting..
perezmu wrote:
I am not sure I understand your question... 'filename keep Minutemen' keeps all comics with 'Minutemen' and removes the rest. Now, adding 'covers keep all' will keep from the ones left (all of which must already be named with 'minutemen'), the one(s) with most covers.

If we have

xxxx-minutemen.cbz
xxxx-dcp (2 covers).cbz

- after rule 1: 'filename keep Minutemen' do we only have:
xxxx-minutemen.cbz

which means that we have lost the '2 covers' file ?
perezmu wrote:
filename keep word1-word2 word3 word4 would make the script search for the string: "word1-word2 word3 word4", so both of your examples would be completely differentiated. Again, this feature, still needs further test!
I am here to test!! lots of dupes causing a stink in the library..:P

==========================================================

p.s. please correct the typos in the success box. 'Script' and 'Success'. And the logfile header still reads 'COMICRACK DUPLICATES MANAGER V 0.2'
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 #12222

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
600WPMPO wrote:
xxxx-minutemen.cbz
xxxx-dcp (2 covers).cbz

- after rule 1: 'filename keep Minutemen' do we only have:
xxxx-minutemen.cbz

which means that we have lost the '2 covers' file ?

Yep! You ought to use them in inverse order:

xxxx-minutemen.cbz
xxxx-dcp (2 covers).cbz

- after rule : 'covers keep all', only:
xxxx-dcp (2 covers).cbz

- now after rule : 'filename keep minuteme', you'd still have:
xxxx-dcp (2 covers).cbz

since it is the only one left and would not be deleted.
p.s. please correct the typos in the success box. 'Script' and 'Success'. And the logfile header still reads 'COMICRACK DUPLICATES MANAGER V 0.2'

I'll do, thanks.
The administrator has disabled public write access.
The following user(s) said Thank You: jetsman
Time to create page: 0.241 seconds

Who's Online

We have 213 guests and 5 members online