Welcome, Guest
Python Scripts for ComicRack

TOPIC: Duplicates Manager (v Alpha - 0.6)

Duplicates Manager (v Alpha - 0.6) 2 years 8 months ago #41771

  • hellscaretaker
  • hellscaretaker's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 2
  • Karma: 0
I have checked my folder of scripts and while the program is installed there is no dmrules.dat in the folder from reading the manual i get the impression there is one already there that you change?
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 8 months ago #41772

  • boshuda
  • boshuda's Avatar
  • Offline
  • Gold Boarder
  • Posts: 295
  • Thank you received: 64
  • Karma: 8
hellscaretaker wrote:
I have checked my folder of scripts and while the program is installed there is no dmrules.dat in the folder from reading the manual i get the impression there is one already there that you change?
By default it's named dmrules.dat.demo. You'll want to modify that file and rename a copy dmrules.dat. Read the rules wiki carefully to figure out how you want the rules to operate.
The administrator has disabled public write access.
The following user(s) said Thank You: hellscaretaker

Duplicates Manager (v Alpha - 0.6) 2 years 8 months ago #41773

  • hellscaretaker
  • hellscaretaker's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 2
  • Karma: 0
Right i did find it thanks and now im looking at the manual and going what the HUH.

If someone has made rules so it does the folowing

removes files that are dup file name but keeps Empire

Then that be great if you could post it then at lest then i can work out the rest as i be blunt honest i cant work it out.
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 8 months ago #41774

  • boshuda
  • boshuda's Avatar
  • Offline
  • Gold Boarder
  • Posts: 295
  • Thank you received: 64
  • Karma: 8
hellscaretaker wrote:
Right i did find it thanks and now im looking at the manual and going what the HUH.

If someone has made rules so it does the folowing

removes files that are dup file name but keeps Empire

Then that be great if you could post it then at lest then i can work out the rest as i be blunt honest i cant work it out.
Check out the following where I posted my dmrules.dat file:
comicrack.cyolito.com/forum/13-scripts/1...a-06?start=110#41594
I would add "filename keep Empire" before "filename keep Kryptonian-DCP", and possibly remove the other "filename keep xxx" lines. If you then add "keep first" at the end, it will only keep one of the files assuming all of the other tests fail to find a reason to keep or remove a particular version.

To strictly do what you want you could probably put the following, but I've not tested it. I'm pretty sure it will remove all but one file it decides is a duplicate, preferring the files with Empire in the name. It will put them in the c:\___dupes___ directory that it will create:
# All possible rules at the end of the file

# this example removes fileless and 
# selects the noads files with largest filesize

@ MOVEFILES True
@ REMOVEFROMLIB True
@ C2C_NOADS_GAP 120

filename   keep Empire
keep        first

#
#
# filename    keep    c2c
# filename    remove  c2c
# filetype    keep    zip rar
# filetype    remove  pdf
# filetype    remove  fileless
# filepath    keep    c2c
# filepath    remove  c2c
# tags        remove  c2c
# tags        keep    c2c
# notes       keep    c2c
# notes       remove  c2c
# text        keep    c2c
# text        remove  c2c
# scan        keep    abc
# scan        remove  abc
# covers      keep    all
# covers      keep	  some
# filesize    keep    largest
# filesize    keep    largest	10%
# filesize    remove  largest
# filesize    remove  largest	10%
# filesize    keep    smallest
# filesize    keep    smallest	10%
# filesize    remove  smallest
# filesize    remove  smallest	10%
# pagecount   keep    largest
# pagecount   remove  largest
# pagecount   keep    smallest
# pagecount   remove  smallest
# pagecount   keep    fileless
# pagecount   remove  fileless
# pagecount   keep    noads
# pagecount   keep    c2c
# keep        first
The administrator has disabled public write access.
The following user(s) said Thank You: hellscaretaker

Duplicates Manager (v Alpha - 0.6) 2 years 8 months ago #41775

  • hellscaretaker
  • hellscaretaker's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 2
  • Karma: 0
AHA now seeing it work it makes sense, also i was doing something else wrong as well :pinch: which didnt help.

Thank you for that
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 7 months ago #41890

  • adamf9898
  • adamf9898's Avatar
  • Offline
  • Junior Boarder
  • Posts: 26
  • Thank you received: 1
  • Karma: 0
Quick question. In the rules dat file, what do i enter in to keep largest page resolution When running this script to remove duplicates? Thanks!
<--adamf9898-->
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 7 months ago #41891

  • Just Bill
  • Just Bill's Avatar
  • Offline
  • Senior Boarder
  • Posts: 49
  • Thank you received: 3
  • Karma: 3
This is one of those scripts that I installed long ago and it always simply worked and I never gave configuration a thought after the initial setup. However I wanted to tweak things a bit and now for the life of me I cannot find the dmrules.dat file anywhere. I thought it was under ComicRack in the Scripts folder but it isn't there. I've even removed and reinstalled the script but still can't find it.

Any ideas?
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 7 months ago #41892

  • Just Bill
  • Just Bill's Avatar
  • Offline
  • Senior Boarder
  • Posts: 49
  • Thank you received: 3
  • Karma: 3
Never mind, I found it. AppData folder instead of Program Files.
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 7 months ago #41893

  • boshuda
  • boshuda's Avatar
  • Offline
  • Gold Boarder
  • Posts: 295
  • Thank you received: 64
  • Karma: 8
The rules file is probably located in something similar to this: C:\Users\USER_NAME\AppData\Roaming\cYo\ComicRack\Scripts\Duplicates Manager

Pagesize related rules

Rule that keeps the comic with largest or smallest pages. It can receive an optional parameter with the percentage of the size. This means that any comic that changes that percentage to the largest/smallest will be kept.

pagesize keep largest
pagesize keep largest 10%
pagesize keep smallest
pagesize keep smallest 10%
pagesize remove largest
pagesize remove largest 10%
pagesize remove smallest
pagesize remove smallest 10%
from code.google.com/p/comicrack-duplicates-m...wiki/RulesFileSyntax
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 7 months ago #41901

  • adamf9898
  • adamf9898's Avatar
  • Offline
  • Junior Boarder
  • Posts: 26
  • Thank you received: 1
  • Karma: 0
Yay! Thanks for the help! These 2 lines seems to do what I was wanting :)

pagesize keep largest 10%
keep first

Well... I thought I had it where I wanted it, but I am still having to go through each duplicate release and open with winrar and opening an image with windows picture viewer and comparing the image details to decide which duplicate releases to keep and which to remove. if anyone is willing to take time to help me out with the commands of the script to do what I am needing, I would greatly appreciate it. As it is very time consuming of doing the way I am doing also its getting to be very annoying. Here is the current:

C:\Users\adamf898\AppData\Roaming\cYo\ComicRack\Scripts\Duplicates Manager\dmrules.dat
# All possible rules at the end of the file

# Rule that keeps the comic with largest pages. 
# https://code.google.com/p/comicrack-duplicates-manager/wiki/RulesFileSyntax

@ MOVEFILES True
@ REMOVEFROMLIB True
@ C2C_NOADS_GAP      120

pagesize    keep      largest 10%
filesize	keep	largest	10%
filename	keep	Minutemen-PhD
filename	keep	Son of Ultron-Empire
pagecount	remove	fileless
covers      keep    some
filename   keep   fixed
filename   keep    edit 
filename   remove  "cover only"
filename    keep    c2c
pagecount	keep	c2c
keep        first
#
#
# filename    keep    c2c
# filename    remove  c2c
# filetype    keep    zip rar
# filetype    remove  pdf
# filetype    remove  fileless
# filepath    keep    c2c
# filepath    remove  c2c
# tags        remove  c2c
# tags        keep    c2c
# notes       keep    c2c
# notes       remove  c2c
# text        keep    c2c
# text        remove  c2c
# scan        keep    abc
# scan        remove  abc
# covers      keep    all
# covers      keep	  some
# filesize    keep    largest
# filesize    keep    largest	10%
# filesize    remove  largest
# filesize    remove  largest	10%
# filesize    keep    smallest
# filesize    keep    smallest	10%
# filesize    remove  smallest
# filesize    remove  smallest	10%
# pagecount   keep    largest
# pagecount   remove  largest
# pagecount   keep    smallest
# pagecount   remove  smallest
# pagecount   keep    fileless
# pagecount   remove  fileless
# pagecount   keep    noads
# pagecount   keep    c2c
# keep        first
# pagesize    keep      largest
# pagesize    keep      largest 10%
# pagesize    keep      smallest
# pagesize    keep      smallest 10%
# pagesize    remove    largest
# pagesize    remove    largest 10%
# pagesize    remove    smallest
# pagesize    remove    smallest 10%
<--adamf9898-->
Last Edit: 2 years 7 months ago by adamf9898. Reason: updating information
The administrator has disabled public write access.
Time to create page: 0.207 seconds

Who's Online

We have 427 guests and 7 members online