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

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
Help me grand-daddy!!! :laugh:

Sounds weird... can you copy here your logfile.log?
The administrator has disabled public write access.

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

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
Also, you could try these rules...
filename    keep    X
covers      keep    all
pagecount   keep    largest

My guess is that the '-' is messing things up...
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 #12149

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
perezmu wrote:
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!

This should be solved in v0.3...

Changelog (click spoiler to display!)
Warning: Spoiler! [ Click to expand ]
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 #12159

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
perezmu wrote:
My guess is that the '-' is messing things up...
Suppose I wish to keep 'Minutemen-DTs' & 'Minutemen-Oracle&Saxon' and remove 'Minutemen-TwiztiD-T' and 'Minutemen - Twiztid Sith'. I can't use the 'keep Minutemen' rule. Neither can I make use of the '-' between their names. Neither can I give a space between the names.

Moreover, I prefer a Minutemen scan over, say, a Legion-CPS scan. However, I won't mind a Legion-CPS scan over, say, a YZ1 scan. How do I proceed?

Basically, I feel that we need to have a hierarchy of rules, so that the first rule is ALWAYS followed, and, if valid, the next rule & then the next, and so on. I don't know if it is possible.. :unsure:

Presently, it seems that I would have to make a huge pile of rules for keeping all the fancy (and growing) scanner names :(

I am highly curious as to how forkicks successfully made a rules list at the first go.. Or amybe I'm totally dumb! :P
perezmu wrote:
This should be solved in v0.3...
Nope..still broken..
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> IronPython.Runtime.UnboundNameException: global name 'InitBookWrapper' is not defined at IronPython.Runtime.Operations.PythonOps.GetVariable(CodeContext context, String name, Boolean isGlobal) at IronPython.Runtime.Operations.PythonOps.GetGlobal(CodeContext context, String name) at SeriesInfoPanel$19(Closure , PythonFunction , Object ) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at _Scripting_(Object[] , ComicBook[] ) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at cYo.Projects.ComicRack.Plugins.PythonCommand.OnInvoke(Object[] data) at cYo.Projects.ComicRack.Plugins.Command.Invoke(Object[] data, Boolean catchErrors) at cYo.Projects.ComicRack.Viewer.ScriptUtility.<>c__DisplayClasse.b__c(ComicBook[] b)

I completely uninstalled the previous version first, and then deleted the duplicate manager folder, and then installed the new 0-3 version.
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 #12161

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
600WPMPO wrote:
.
Basically, I feel that we need to have a hierarchy of rules, so that the first rule is ALWAYS followed, and, if valid, the next rule & then the next, and so on. I don't know if it is possible.. :unsure:

Presently, it seems that I would have to make a huge pile of rules for keeping all the fancy (and growing) scanner names :(

Well, that is exactly how it is suposed to work! I really need to see your 'logfile.log' for your test to diagnose!!!!!. Regarding fancy names, I will see to it.
perezmu wrote:
This should be solved in v0.3...
Nope..still broken..
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> IronPython.Runtime.UnboundNameException: global name 'InitBookWrapper' is not defined at IronPython.Runtime.Operations.PythonOps.GetVariable(CodeContext context, String name, Boolean isGlobal) at IronPython.Runtime.Operations.PythonOps.GetGlobal(CodeContext context, String name) at SeriesInfoPanel$19(Closure , PythonFunction , Object ) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at _Scripting_(Object[] , ComicBook[] ) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at cYo.Projects.ComicRack.Plugins.PythonCommand.OnInvoke(Object[] data) at cYo.Projects.ComicRack.Plugins.Command.Invoke(Object[] data, Boolean catchErrors) at cYo.Projects.ComicRack.Viewer.ScriptUtility.<>c__DisplayClasse.b__c(ComicBook[] b)

I completely uninstalled the previous version first, and then deleted the duplicate manager folder, and then installed the new 0-3 version.

This I cannot understand!!!! can anyone else confirm this?
The administrator has disabled public write access.

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

  • forkicks
  • forkicks's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 871
  • Thank you received: 109
  • Karma: 37
600WPMPO wrote:
I am highly curious as to how forkicks successfully made a rules list at the first go.. Or amybe I'm totally dumb! :P

No, my rules are much simpler. I simply keep the largest, non-c2c file. I -could- prefer Minutemen scans, but i already pick those when downloading, and they are usually (always?) larger size anyway, so they get hit by the rule i specified - which is basically the set on the .demo rule file.

fK
The administrator has disabled public write access.

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

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
Ok, version 0.4 is out:
v0.4 -> Bug fix Release

   Fixed:   - Issue 7 (fileless removal) finally solved (I hope!)
	    - Issue 6 (series info panel corruption) finally solved (I hope!)
	    - Correctly changed version number in Package.ini
The administrator has disabled public write access.

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

  • 600WPMPO
  • 600WPMPO's Avatar
  • Offline
  • Moderator
  • Posts: 3788
  • Thank you received: 557
  • Karma: 232
perezmu wrote:
Ok, version 0.4 is out
Updated to v4. This time, the series info panel is working fine!! :)

Finally I find these rules should serve my needs:
filename	keep	Kryptonian
filename	keep	Jojo
filename	keep	Minutemen
filename	keep	fixed
filesize	keep	largest
covers	keep	all
pagecount	keep	largest

I run this on these 3 dupes I have:



It gives its message: (I notice 2 typos)



But, the files stay where they are :blink: :blink:

I check the constants.py file.. it appears correct



What am I doing wrong? :(

I check the logfile (attached below).. it shows the log for the previous version.

File Attachment:

File Name: logfile.txt
File Size:2 KB


p.s. +1 karma for the exhaustive work on the wiki!! perezmu, I really wish to make this script work for me. Hope you don't mind my bugging you daily.. :unsure:
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 #12167

  • perezmu
  • perezmu's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 1114
  • Thank you received: 64
  • Karma: 51
600WPMPO wrote:
p.s. +1 karma for the exhaustive work on the wiki!! perezmu, I really wish to make this script work for me. Hope you don't mind my bugging you daily.. :unsure:

No problem! A bug-finding bugger! :P

I need you to do the following, please:

1) Change the VERSBOSE option in constants.py to True

2) Run the script in both examples you gave me (saving the logfile.log for each case)

3) Post both logs...

Thanks!
The administrator has disabled public write access.

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

  • pescuma
  • pescuma's Avatar
  • Offline
  • Expert Boarder
  • Posts: 115
  • Thank you received: 16
  • Karma: 21
@ 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.


EDIT: One more:
3. Add a command to keep the one that has data in the field Alternate Series Number (that afaik CVS does not fill)
Last Edit: 6 years 9 months ago by pescuma.
The administrator has disabled public write access.
Time to create page: 0.241 seconds

Who's Online

We have 331 guests and 7 members online