Homestead Tinkerer
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Automatic Screenshotter

Go down

Automatic Screenshotter Empty Automatic Screenshotter

Post by Admin Sun May 15, 2022 8:45 pm

https://www.donationcoder.com/software/mouser/popular-apps/automatic-screenshotter

I ran across some post somewhere mentioning de-DRMing Kindle books with Apprentice Alf plugin for Calibre and how it doesnt work on newer format kindle books. Now frankly I mostly read free Kindle fiction books and have no interest in keeping a copy independent of Kindle. And current Kindle right now works ok in WINE. By way, it seems most stable if you set winecfg to use win7 for Kindle.

But at one point some years ago I found a windows only app (didnt work in WINE) that did an endrun. It would flip through an ebook and take screenshot of every page. Automated and reasonably fast, you didnt have to manually go page to page. Didnt deDRM anything. Kinda like using a photocopy machine to copy few pages of a book at library. I messed with it a bit, had no real use for it and it was shareware so they gave short trial and then wanted money.

So was looking around for freeware automated screen shot software. Bingo, found Automatic Screenshotter. Its a 32bit windows app. Yes it runs perfect in WINE.

So you go through the settings, I set it to take a screen shot every 3 seconds UNLESS no significant pixel change on the screen. And set it to make click noise when it takes a shot.

Opened Kindle for PC and started Automatic Screenshotter and started reading. Sure enough every page turn and click. Ok, but really didnt want whole screen, just the book page so yes you can set it for the region of screen you want a shot of. And yes that cut size of png file down to 64kb. Thats its lowest setting. You dont need super detailed pics of printed book page.

Is this a great way to copy a book. No not really, but it is a non-annoying way to copy a book protected everywhich way that you really want to copy. Dont have to remember to manually push the prtsc key. I wouldnt bother cause as I say most Kindle books I read are fiction and I have little to no interest in reading them more than once.

Admin
Admin

Posts : 511
Join date : 2014-07-09

https://homesteadtinkerer.forumotion.com

Back to top Go down

Automatic Screenshotter Empty Re: Automatic Screenshotter

Post by Admin Thu Jun 16, 2022 8:45 am

Ok, went further with this, posted in 32bit WINE section on Puppy Linux forum in more detail.  But to consolidate.

Yes I was able to automate page turning in the Kindle for PC app running in WINE.  Used xdotool.  Trying to have it push right arrow key didnt work.  So had to map screen and have it move mouse cursor to the page turn spot and then click.  

Here is basically the little executable script I used:

#!/bin/bash
while true;
do sleep 3;
xdotool mousemove 1412 506;
xdotool click 1;
done

Your screen probably different resolution, etc.  To get the coordinates, place your mouse cursor on next page turn spot.  Then run "xdotool getmouselocation --shell" minus the quotes.  It will give you the screen coordinates of cursor.  

Anyway I tried long Kindle book.  Set both screenshotter and my script to 3 seconds sleep/delay.  And let it have at it.  Over 1000 page book so took a while.  I am sure probably could get it down to 1 sec delay, but didnt really care since whole point is for it to automate without my babysitting it.  Oh you probably will have to manually trigger it for the cover, since screenshotter wont see change for that and wont auto snap shot of it.

So now I have a directory with over 1000 lowest resolution png snapshots.  You can use your built in viewer and read them.  By way put in mention of Nomacs.  Its standard in MX linux, but windows version too.  Too much hassle to compile it for EasyOS so just grabbed the old 32bit windows version and it works fine in WINE.  At first didnt think this old version did the slideshow option.  But it does, they just call it "player" and the delay setting is on first page of settings at bottom.  Yea, not intuitive, but works fine.

Now this 1000 png directory was like 70MB.  Ouch.  I used Image Magick conversion to make all that into a single pdf.  Pdf in pdf reader actually good way to read it too.  But then converted the pdf to epub file in Calibre.  This got it down to like 30MB.  Reading and might try using ghostscript to make the pdf lower resolution and smaller file, before converting to epub.  The epub version was readable but nothing adjustable.

Epub maybe least pleasant way to read this copied book, it wont let me change font or background, etc cause yea its still a collection of png photos at heart.

Now if you arent that concerned with the images contained in the book,  there is OCR software (like linux Tesseract) that will grab the text from the png images.  This would greatly reduce the size of the file back to typical epub.  I didnt do that though might be interesting to see what kind of result.  I had OCR software that came with an old scanner I had many years ago.  I remember playing with it some.  It worked but cant remember if it saved any formatting. Or if it required lot editing.

Honest if space not an issue, and you are going to read it on computer or some gizmo that can do pdf, you might want to just leave it as pdf file.  Its kinda cool to use Nomacs and to directly use the png files, but bit unweildy to store directories of hundreds of png files.  The conversion to single pdf is cleaner.

Oh Image Magick is included or easily installable on any linux.  Downside, I never got the version available for EasyOS from package manager to do pdf convert.  It will kill itself. Message I got when tried to run conversion in terminal, it would set there for while, then KILLED appear.  The version on MX-19 did fine but had to modify policy.xml  file in /etc to let it access pdf.  That was first try with the 200page book, the 1000+page book had to also change memory useage in same policy.xml configuration.  Image Magick works for sure but it can require tinkering, google (or your favorite search engine) is your friend.

Not lot alternatives to using Image Magick and Calibre as mentioned above, least not free alternatives.  No idea why the version Image Magick on EasyOS was so unfriendly.  Its slightly newer but didnt have the options in its policy.xml that the version on MX had. I tried adding them, sometimes you can do this to a configuration file, but nope, didnt work.

Oh and the "universal linux version of latest Calibre" also didnt work well on EasyOS.  It installed and run, but couldnt add or view books which kinda makes it worthless.  Sure some library it expected missing or wrong version.  Though didnt throw an error.  Getting low on data so didnt mess further, just got out old reliable windows version and ran it in WINE.  It worked fine for what I needed it.

Oh learned something about Calibre, its made of components.  In windows or linux version you can (well should be able) to run the ebook-viewer separate from full Calibre.  The viewer run alone loads faster.  And its a good ebook viewer.  Less pleasant and more clunky when called from full Calibre gui.

Admin
Admin

Posts : 511
Join date : 2014-07-09

https://homesteadtinkerer.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum