MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Plugins (https://www.mobileread.com/forums/forumdisplay.php?f=268)
-   -   [idea] Remove duplicates (https://www.mobileread.com/forums/showthread.php?t=320063)

un_pogaz 05-14-2019 09:50 AM

[idea] Remove duplicates images
 
Some books contain duplicate images (sometimes +10 duplicate)
With a little trickery, the Regex and the unused media deletion tool, you can delete a lot of duplicates.
But in some cases, there may be a different image in the middle, or even several duplicate images.

This is where the idea for this plugin comes from:
1) The plugin opens a wall of thumbnail displaying the images of the book (or a check-list with a preview area for quick consultation)
2) We select the images that we consider identical
3) The plugin "merges" the images (renames them with a Regex like this one below, then deletes the images that have become unused)

(Images/0002.jpg|Images/0003.jpg|Images/0006.jpg|Images/0008.jpg)
>
Images/0002.jpg

Thank you in advance.

AlanHK 05-25-2019 02:03 AM

Yeah, it's really annoying to open a file and see it has 50 names for some ornament, all indistinguishable, but not binary identical.

I use Irfanview's Thumbnail view, then rename in Sigil to a common prefix, then use a regex to make all similar images link to one image, remove unused images.

This can reduce the filesize by 50% or more and make the code more intelligible.

theducks 05-25-2019 01:35 PM

I use Report: Images part of the editor.
You can sort by size and visually see the image.
Then I REGEX the books Image code (NEVER use REPLACE ALL) AND Replace 1-at-a-time that I am really sure are identical (subtle diffs has got me before).
Then I rescan Reports, and select n delete those with 0 uses (yes, you can delete from reports)

DNSB 05-25-2019 04:25 PM

Quote:

Originally Posted by theducks (Post 3849169)
Then I rescan Reports, and select n delete those with 0 uses (yes, you can delete from reports)

That's a handy bit of knowledge. :thanks:

un_pogaz 05-28-2019 04:21 AM

Quote:

Originally Posted by theducks (Post 3849169)
I use Report: Images part of the editor.

:blink::blink:
What/Where is it's this feature?

BetterRed 05-28-2019 04:30 AM

Quote:

Originally Posted by un_pogaz (Post 3850019)
:blink::blink:
What/Where is it's this feature?

Tools->Reports->Image Files

BR


All times are GMT -4. The time now is 08:43 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.