Welcome, Guest
Try to get help from other ComicRack users

TOPIC: SmartList Challenge! - Determine large files by page size/width

SmartList Challenge! - Determine large files by page size/width 3 months 2 days ago #48075

  • cxsconsulting
  • cxsconsulting's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
  • Karma: 0
Okay so I have a large library (69K comics, 2.3TB). I have organized the entire thing using CVS, LO, DM but I have reached the point where I want to begin trimming back the size of the library in terms of HDD space. So what I have begun doing is resampling the comics down to a maximum standard page size (1440px single page width). I have found that the quality is quite fine at this level and looks great for reading and produces a significantly smaller file size.

I don't feel like resampling every comic, especially since many of the comics are already at a sufficiently small size.

What I am looking for is a way to create a smartlist that will allow me to target the comics which would benefit most from this resampling. I would love to be able to do this in one of two ways.
1) If 50% of the pages in a comic have a width greater than 1440px
2) Set a value for the average page file size and return comics that exceed it.

I currently target using a smartlist looking for comics below a defined page count with a file size greater than another value. But this frequently misses trades, GN and other high page count comics.

Are there any scripts or other creative ways that people think this could be done?

Thanks to everyone who is a part of this ComicRack project. I rediscovered my love of comics through this program!
The administrator has disabled public write access.

SmartList Challenge! - Determine large files by page size/width 3 months 18 hours ago #48076

  • ajyates
  • ajyates's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
You can do this. But probably not within Comic Rack.

As long as your files are CBR/CBZ format you can write a script that will open the archive, pull out the first image and look at the file dimensions, if it's over 1440px wide then you can make a note of it.

That's probably the only thing you can do for it.
The administrator has disabled public write access.

SmartList Challenge! - Determine large files by page size/width 2 months 3 weeks ago #48087

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
I have been working with this problem A LOT in the past, and I remember figuring out some things about this...

First, CR DOES save comic resolution in the comic data (although you have to at least view or make a preview of every page for the program to LOAD this data into the comic database or comic xml if you save the info in the comics)

I made a few smartlist scripts that work with this data... When I am at home I will try to search for them, perhaps I have something that can help with your problem :)

All the same you have to at least view all pages thumbnail for the data to be stored in the database and use it... which in a very large comic library could take literally DAYS (I know, becuase I have done it before :P)

Nowaday I load all pages resolution into comicrack database when looking for ads and similar in the comics to delete... which takes a few seconds per comic and is part of my "system"
Last Edit: 2 months 3 weeks ago by Xelloss.
The administrator has disabled public write access.

SmartList Challenge! - Determine large files by page size/width 2 months 3 weeks ago #48088

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
Here, copy this (uncompressed) to your script folder:

File Attachment:

File Name: MinResolution.zip
File Size:1 KB


This will add a new User Script in smartlist options called MinResolution

There you will have two fields to complete, the first is X resolution and the second is Y resolution.

The script will look for all comics with the above conditions (as any smartlist rule) that:

Has at least a page with X resolution (width) less or equal than the value you put in the first field

OR

Has at least a page with Y resolution (heigth) less or equal than the value you put in the second field

For example:

200 100

will filter comics with at least a page with the following resolutions:

200x100 will pass
210x100 will NOT pass
210x110 will NOT pass
190x100 will pass
190x110 will pass
200x90 will pass
190x90 will pass

remember that with only ONE page that doesn't pass the filter, the comic will not pass the filter...

For MAX resolution, just use the rule negator :P

Important note: This will only works with comics which resolutions were fully loaded... if you want to know which comics has pages with resolution not loaded, make a smart list with this same script and put 0 and 0, and it will show all comics that needs to be read for resolution to be loaded...

all comics with a page which resolution was not loaded will not be filtered by this script.. (as default resolution is view as 0x0)

For QUICKLY resolution loading, just go to properties of the comic, open the "pages tab" and wait till you see all pages thumbnails... scroll if you need to

Once the resolution is loaded for every page, it will be saved in the database forever, and in the comic xml if the option is checked



I have used this script for a long time now, for my own sorting system, and it works perfectly... The only problem being you have to load all the pages every time you add a comic, which only take a few seconds for every comic, but a lot of time for a lot of comics...

I edited it a bit for this post, to make it more user friendly... but as it is more a "custom script for myself" rather than a script I properly prepare for others to use, it is still in .py format (without automatic installation). If enough people show interest in it, I will make a proper one (with more options and more "finished) and post it in the forum :) (I don't think enough people would use it all the same :P)
Last Edit: 2 months 3 weeks ago by Xelloss.
The administrator has disabled public write access.
The following user(s) said Thank You: romsnesrom

SmartList Challenge! - Determine large files by page size/width 2 months 2 weeks ago #48093

  • jkthemac
  • jkthemac's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 766
  • Thank you received: 253
  • Karma: 55
My own version of doing this is to divide the file size by the page count and use varying numbers to search out very large or very small pages.

So for example:
Name "Small Pages"
Match [Expression] is true "{FileSize}/{PageCount}<=250000"
Name "Large Pages"
Match [Expression] is true "{FileSize}/{PageCount}>=4000000"
Last Edit: 2 months 2 weeks ago by jkthemac.
The administrator has disabled public write access.

SmartList Challenge! - Determine large files by page size/width 2 months 2 weeks ago #48097

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
Yesterday (at work, then I wonder why I am losing work productivity XDDD) I was playing with the API and the methods not registered in the official documentation and found a lot of things to play with about this... I am trying to find a better solution for all this resolution problems... I will keep you updated :)
The administrator has disabled public write access.

SmartList Challenge! - Determine large files by page size/width 2 months 2 weeks ago #48106

  • Xelloss
  • Xelloss's Avatar
  • Offline
  • Platinum Boarder
  • Posts: 455
  • Thank you received: 117
  • Karma: 24
Well, today I came up with this solution for the resolution no loaded problem:

File Attachment:

File Name: LoadPagesInfo.zip
File Size:1 KB


Just select all the comics with no resolution loaded in each page, and run this script (in automation), the script will load one by one each page resolution and save the info in the page resolution information.

After that you can use my other smartlist script to look and filter by page resolution :)

The script also add a custom value called Pages_Hashes that will save the hashes of each page image, this can be used for example to look for duplicated pages in your library (what I am working in now)

IMPORTANT As this script open each page for the info, the process is SLOW... it takes about 3-8 seconds for comic, this means about a minute for 12 comics, and about an hour for 800 comics... (and so on). Please try it first in a few comics, and be patient if you use it in a large number of comics.

Once the information is saved in the comic, it will be used as if you read the comic or view the preview of each page...If you want this info to be permanently saved in the comic file (and not in the comicrack database), just export the comic using Comicrack and the info will be in the xml inside the new file (the resolution of each page, not the hashes)

Also, the script use the hash custom value for comparing with multiple runs... if the number of pages is the same in the comic and in the hashes list, the script will ignore the comic and not scan it again. This is usefull for not having to wait hours each time we rescan all our library, as it will only scans the comics not correctly already scanned...

This script is mostly for not having to preview each page of every comic we have to be able to work with the scripts that use page resolution as input... (which not only takes A LOT more time, but also it has to be done manually for each comic)
Last Edit: 2 months 2 weeks ago by Xelloss.
The administrator has disabled public write access.
The following user(s) said Thank You: cxsconsulting

SmartList Challenge! - Determine large files by page size/width 2 months 4 days ago #48181

  • cxsconsulting
  • cxsconsulting's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
  • Karma: 0
I appreciate your time looking into this and providing me with one more tool to organize and format my library. If I could only get paid for the time I obsess over my comic library!

I really do appreciate your time responding back to me!
The administrator has disabled public write access.
The following user(s) said Thank You: Xelloss
Time to create page: 0.203 seconds

Who's Online

We have 227 guests and 7 members online