Welcome, Guest
Python Scripts for ComicRack

TOPIC: Duplicates Manager (v Alpha - 0.6)

Duplicates Manager (v Alpha - 0.6) 2 years 6 months ago #41910

Hi Guys,

This is probably a dumb question but in my defence I've got an aquired brain injury following a car accident and therefore lost a lot of my computer skills so sorry in advance if I come off as a complete idiot.

I've got a large number of duplicates in comic rack and want to use the Duplicates Manager script but it keeps telling me that it need the drmrules.dat file. My understanding is that you have to write this file yourself and I gather it's just a text file copied to the directory where Comic Rack is installed. I dont have a lot of requirements I just want to keep one copy of each comic and for some reason I have a lot of copies of various comics and some that are just the variant covers and not the actual comic that I'd like to get rid of.

From what I can tell I simply need;

pagesize keep largest

for my file to achive what I want. Is this correct or do I need to add anything else to the text file? As I said I've got an ABI so sorry if this seems to simple to list here and thanks for any replies
Last Edit: 2 years 6 months ago by the_darkknight.
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 6 months ago #41911

  • adamf9898
  • adamf9898's Avatar
  • Offline
  • Junior Boarder
  • Posts: 26
  • Thank you received: 1
  • Karma: 0
for your dat file, check in C:\Users\yourname\AppData\Roaming\cYo\ComicRack\Scripts\Duplicates Manager\dmrules.dat and open the file using notepad to edit.
<--adamf9898-->
The administrator has disabled public write access.
The following user(s) said Thank You: the_darkknight

Duplicates Manager (v Alpha - 0.6) 2 years 6 months ago #41912

Thanks heaps adamf9898. Couldn't find the file origionally because it's dmrules.dat.demo in mine not just dmrules.dat
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 6 months ago #41914

  • boshuda
  • boshuda's Avatar
  • Online
  • Gold Boarder
  • Posts: 285
  • Thank you received: 63
  • Karma: 7
adamf9898 wrote:
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%

I don't believe it's possible to completely replicate what you're trying to do with the code as it exists today. I'm not even sure it's reasonable to do it with the api. The api, afaik, will give you a bmp version of a page. That could then be compared for resolution. But it might not be an accurate representation of the pages as they exist in the file depending on how that page is extracted. I suspect it would be necessary to instead get the archive file location and use other methods to get at the images inside the archive. If individual page file information is available through the api I haven't seen any documentation on it.

Remember that the duplicates manager code is open source so you can view it yourself and possibly modify it to do what you want.

If i remember correctly, the way duplicates manager does it now is to use the average size of the images by dividing the number of pages by the file size.
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 6 months ago #42089

  • hellscaretaker
  • hellscaretaker's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 2
  • Karma: 0
This is one of this hitting the ball out in the ball park questions.

Convergence - Superboy
Convergence, - Superboy

Both are the same comic but cause of the "," in the filename the script treats them as two unique comics. Is there a work around with this to where it would remove the " Convergence,"
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 4 months ago #42310

  • adamf9898
  • adamf9898's Avatar
  • Offline
  • Junior Boarder
  • Posts: 26
  • Thank you received: 1
  • Karma: 0
I have listed a "personal" list with the scanner groups that I would like to keep over other scanner groups. How would I go about having duplicates manager to keep the scans on the left but remove the ones from the right? I am a bit confused on how to edit the .dat file to do this. So I have come to the forums to ask. Any advice, comments, etc. are welcome!
filename	keep	Minutemen-InnerDemons   >	Mephisto-Empire
filename	keep	Minutemen-Faessla       >	Nahga-Empire
filename	keep	Minutemen-Spaztastic    >	Son of Ultron-Empire
filename	keep	CompetentRipper-Empire  >	Minutemen-Faessla
filename	keep	Ol' Joe-DCP             >	ThatGuy-Empire
filename	keep	The Last Kryptonian-DCP >	Nahga-Empire
filename	keep	Minutemen-InnerDemons   >	Son of Ultron-Empire
filename	keep	Mephisto-Empire         >	Minutemen-Midas
filename	keep	Minutemen-InnerDemons   >	Zone-Empire
filename	keep	Darkness-Empire         >	Minutemen-Faessla
filename	keep	Darkness-Empire         >	Minutemen-InnerDemons
filename	keep	CompetentRipper-Empire  >	The Last Kryptonian-DCP
filename	keep	Digital-Empire          >	Minutemen-Midas
filename	keep	CompetentRipper-Empire  >	Webrip-DCP
filename	keep	Minutemen-PhD           >	Nahga-Empire
filename	keep	Vee-Empire				>	Minutemen-Spaztastic
filename	keep	Minutemen-Faessla		>	Zone-Empire
filename	keep	Zone-Empire				>	The Last Kryptonian-DCP
filename	keep	Minutemen-PhD			>	Zone-Empire
filename	keep	ThatGuy-Empire			>	Minutemen-Midas
filename	keep	CompetentRipper-Empire	>	TheOrions-DCP
filename	keep	Minutemen-Midas			>	Archangel+Zone-Empire
filename	keep	Darkness-Empire			>	Minutemen-Spaztastic
filename	keep	Darkness-Empire			>	theProletariat-Novus
filename	keep	Ol' Joe-DCP				>	Thornn-Empire
filename	keep	Minutemen-Spaztastic	>	BlackManta-Empire
filename	keep	Minutemen-Spaztastic	>	Nahga-Empire
filename	keep	Minutemen-Spaztastic	>	Zone-Empire
filename	keep	Minutemen-Faessla		>	Digital-Empire
filename	keep	Minutemen-PhD			>	Vee-Empire
filename	keep	Digital-Empire			>	The Last Kryptonian-DCP
filename	keep	Minutemen-Midas			>	Son of Ultron-Empire
filename	keep	Darkness-Empire			>	Minutemen-Midas
filename	keep	Thornn-Empire			>	The Last Kryptonian-DCP
filename	keep	Digital-Empire			>	Webrip-DCP
filename	keep	Minutemen-InnerDemons	>	Digital-Empire
filename	keep	Minutemen-Acan			>	Son of Ultron-Empire
<--adamf9898-->
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 3 months ago #42505

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
Hi,

I guess you have already figured it out by now.

The dupes manager does not allow you to choose one between two options... it is a 'cascading' style of chosing: it sequentially processes your entries, so, you should have an absolute order of preference of your scanners and
add keep entries in that order, like:

filename keep Minutemen-InnerDemons
filename keep Minutemen-Faessla
filename keep Minutemen-Spaztastic
filename keep CompetentRipper-Empire
filename keep Ol' Joe-DCP

This would keep all those comics with InnerDemmons and delete any other duplicates that are not from InnerDemmons,
then, if for a comic there is no InnerDemmons scan, it would try to keep Faessla's, and delete other copies... if no Faessla, then it would try to do the same for Spaztastic...

In the end, if you set your absolute order of scanners like that, you would keep only for each comic the copy that matches the upper most line in your list...

I hope this helps!
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 2 years 3 months ago #42549

  • adamf9898
  • adamf9898's Avatar
  • Offline
  • Junior Boarder
  • Posts: 26
  • Thank you received: 1
  • Karma: 0
yes this helps thank you so much!
<--adamf9898-->
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 1 year 11 months ago #43742

  • t_jay17
  • t_jay17's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 13
  • Karma: 0
What is the newest version?
The administrator has disabled public write access.

Duplicates Manager (v Alpha - 0.6) 1 year 11 months ago #43756

  • boshuda
  • boshuda's Avatar
  • Online
  • Gold Boarder
  • Posts: 285
  • Thank you received: 63
  • Karma: 7
hellscaretaker wrote:
This is one of this hitting the ball out in the ball park questions.

Convergence - Superboy
Convergence, - Superboy

Both are the same comic but cause of the "," in the filename the script treats them as two unique comics. Is there a work around with this to where it would remove the " Convergence,"
Sorry I missed this months ago :blush:. It's been a loooong time since I've modified duplicates manager in any way, shape or form. However, IIRC, it uses much of the same info as ComicRack itself to decide if a comic is a duplicate. I don't think it has any kind of regular expressions or any other search terms to look for duplicates. Essentially, with some small number of exceptions, if ComicRack doesn't recognize a comic as a duplicate then Duplicates Manager won't either.

Pretty sure the newest version is 0.9 at Google Code. Because Google Code is shutting down, and I'm not sure if anyone else did it, I'm porting it over to GitHub. At least that way we'll be able to get it after Google Code shuts down.
The administrator has disabled public write access.
Time to create page: 0.212 seconds

Who's Online

We have 253 guests and 10 members online