Automatic Screenshotter

Moderator: Forum moderators

Post Reply
User avatar
mouldy
Posts: 590
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 39 times
Been thanked: 167 times

Automatic Screenshotter

Post by mouldy »

https://www.donationcoder.com/software/ ... eenshotter

This works perfect in WINE 7.1 on EasyOS. Anyway its an app you can set to automatically take screen shots or partial screen shot either with timer or by pixel change or both. For any purpose you find useful. With option not to take a new shot if there has been no significant pixel change. Your clock advancing will not trip it. I left the camera click sound effect just so I knew it was working.

I got interested cause Apprentice Alf hasnt updated Calibre plugin to convert current format Kindle books via the Kindle for PC app or Kindle for Mac app. AA plugin can convert book files downloaded for actual Kindle paperwhite handheld reader. Which is a loophole that probably prevents any rapid development on the AA plugin. Just buy a cheap used paperwhite and use its serial number. Long ago i ran across a windows only (didnt work in WINE) shareware app to do this screenshot thing only it would also automatically go through book and screenshot pages and put them all back together into an ebook I think. They wanted money after brief trial run.

Automatic Screenshotter used this way really only works if you want copy of book as you read it page by page. It wont otherwise interact or advance book pages in Kindle for PC app. Well guess you can manually advance the pages if you want... It wont automate anything other than taking the screenshots when page changes. Oh and the lowest resolution setting ends up with 64kb png image per page. And yes you can then use Image Magic to convert the png's into one pdf, then Calibre can convert the pdf to an ebook format. Whew.... There are couple other linux apps that can do this png to ebook in one go, but one requires latest cutting edge version python and the other is only available in a humongous flatpak package, not worth it at all unless you were doing this often.

Would I suggest this for frequent use, no not really, its an endrun around DRM silliness using free software without de-DRMing anything. Like photocopying a paper book at library. I personally mostly read free fiction on Kindle app and have no desire to read it more than once or to save an independent copy. But if you want to, you can. It doesnt care the format, its a screenshot software and works darn well IMHO. I really was pleasantly surprised running this in WINE that it worked so well. sure it has other uses than my suggested endrun around DRM.

User avatar
mouldy
Posts: 590
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 39 times
Been thanked: 167 times

Re: Automatic Screenshotter

Post by mouldy »

Hmm, had heard of using hotkey in windows with script. Looking and linux Xdotool seems like it could do the same to advance page in Kindle for PC automatically. Automatic Screenshotter then detects the change and snaps a pic. Either tell Xdotool to push right arrow key, sleep 3 (or whatever) and repeat or tell it to click mouse on certain part of screen. Have to experiment to find best way. This actually could work well for a disabled person reading a book, set up for auto page turn. Would depend on how fast of a reader the person was, how long the wait. No idea why auto page turn isnt just built into Kindle for PC as an option.

So guess one could set things up to automatically copy a book unattended. Be interesting for sure. Wonder what minimum time to allow since nobody is actually reading the book while its being copied. I would think you could copy a 300 page book in 5min or less. Not sure how fast Automatic Screenshotter can snap pics. That would be limiting factor.

Actually if one didnt care if whole screen copied, one wouldnt actually need Automatic Screenshotter, just use Xdotool and write script to push right arrow key, then push Prtsc key over and over. Though Screenshotter gives more control as to resolution, area of screen copied, etc. Not sure how adjustable Prtsc key is, if at all.

User avatar
mouldy
Posts: 590
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 39 times
Been thanked: 167 times

Re: Automatic Screenshotter

Post by mouldy »

I was curious how well using screenshotter on a DRM book worked. I found a short free book on doityourself solar electric and opened it on Kindle for PC app (in WINE), then manually turned pages letting screenshotter take png pic of the page portion of the screen. Yea all 200+ pages. Bleh, definitely want to try automating this.

Anyway ended up with a directory of png snapshots. Used convert command from Image Magick to make a pdf of all the png snapshots. Be aware Image Magic requires you to modify its policy.xml to allow read|write for pdf in order to do this. Took me a bit to figure out what was going on when it I kept getting CLI convert process KILLED. You could of course stop here and read book with pdf reader. Might even have more control that way on size of images. Then converted pdf with Calibre to an epub.

Opened result in epub reader. Yea its definitely readable. However its still basically a slideshow of those png snapshots. So one cant increase font, etc. However you do get images, important in say a technical manual. I also suggest setting your reader to scroll in continuous mode if your reader allows this. Makes it more pleasant and more like a book than a slideshow.

Now there is OCR software (like linux Tesseract) that will grab the text from the png images. This could give one more normal ebook experience, though minus the images in the book. Fine for most novels or such where images not that numerous or important. Lot room for improving how this works. Like say first improvement needed is to automate page turning for screenshotter. Not fun sitting there manually pushing the right arrow key at every beep when screenshotter takes a photo. This time around, I was more curious going from 200+ screenshots to an epub book. Whether the result was really doable to where book was readabe without being gigantic in size. It is. Not great way to do it but definitely readable and usable. And no de-DRM tricks needed. This is basically the computer version of photocopying pages from a paper book at library.

User avatar
mouldy
Posts: 590
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 39 times
Been thanked: 167 times

Re: Automatic Screenshotter

Post by mouldy »

Oh, I was amused. Somehow on MX, I opened the directory of png screenshots in nomacs. Nomacs is installed by default in MX as image viewer. Seriously this was nice way to read book, simply adjust it to fill the screen and get full size font. And the version in MX had "toggle slideshow" option under VIEW. You can set slide operation to be slow enough to read.

Curious and ouch, the current nomacs is large IMHO. But they offer the old XP 32bit portable version. Its only 10MB. I unzipped it and moved the folder to WINE program files directory. Cool, it works well. Yea, having directories with few hundred screenshots isnt exactly convenient compared to single pdf or epub file. But honestly it makes reading a book made up of screenshots very pleasant. Now one downside to the old XP version Nomacs, it doesnt offer the "toggle slideshow" view option. Not deal killer but I liked that slideshow option. Ought to see if I can statically move Nomacs from MX to Easy. Some software works this way, some doesnt.

Just tried it, opened the single pdf file in Firefox. It gives several options. Got it working very nicely in presentation mode. No "toggle scrolling" but otherwise it works fine with full size font like the way it was when screenshotter took the shots. First rule to try using whats already installed. This works ok. Wondering if way when Calibre converting pdf to epub, if it could show like this rather than shrinking the "screenshots". Not like there are lot ways to convert pdf to epub.

User avatar
mouldy
Posts: 590
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 39 times
Been thanked: 167 times

Re: Automatic Screenshotter

Post by mouldy »

Ok, thet old "XP" 32bit portable version Nomacs does have slideshow, I somehow triggered it, then couldnt figure out how i did it. Not called slideshow in this version and not in same location. But look for option called "player". Then you can set delay on first screen in settings. Its little box towards bottom. 10 to 11 seconds seems about right. Faster for faster reader, slower for slower reader.

I played a bit with statically moving nomacs files from MX, but finally ran into a dependency I couldnt satisfy. It always struck me as odd, but running windows versions of software in WINE sometimes is the end run around dependency hell. I imagine the unofficial appimage for latest Nomacs works fine but its 100MB. I guess if you have fast unlimited connection and a large hard drive, hey go for it.

Yea, its not great to have a book as hundreds of png files in a directory, but almost worth it to use this nomacs slideshow feature. Dont know if anything gives that option for pdf or epub or not. Probably can approximate it with Xdotool telling it to press right arrow key, then sleep 10 seconds, press right arrow key, over and over again....

Last edited by mouldy on Wed Jun 15, 2022 2:28 pm, edited 1 time in total.
User avatar
mouldy
Posts: 590
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 39 times
Been thanked: 167 times

Re: Automatic Screenshotter

Post by mouldy »

Ok, I have the pages auto advancing on the Kindle app. Trying to use xdotool to press right arrow key didnt work. I had to map the screen and "xdotool mousemove x,y" then "xdotool click 1"

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

This works, kinda crude, but works. Now just little juggling act getting everything started and working together. I will eventually try tying it all together in script. The 3 stands for 3 seconds, you can substitute any number seconds you want it to sleep.

Oh to get screen coordintes open Kindle app, open terminal, put mouse cursor where you want it, then type "xdotool getmouselocation --shell" It will give you x and y coordinates of the cursor.

EDIT: Ok failed first time to copy longer book cause my electric service (and computer) went off in middle of it... Second time it did exactly what its supposed to do. No more than I will use this, dont think I will further refine it, worked ok, wasnt a big hassle. More of a challenge to see if I could make it work than actually needing it. I had both automatic screenshotter and my page turner script set to 3 seconds. I am sure it probably could be speeded up. Again where I dont have to babysit it, dont care that much. So yea again it works fine. When it gets to end of book it just sets there waiting. If screen doesnt change, screenshotter doesnt take new shot. It just waits. This is the analog solution to DRM protected ebooks. And whole lot easier than trying to de-DRM a book.

User avatar
mouldy
Posts: 590
Joined: Tue Dec 08, 2020 3:53 pm
Has thanked: 39 times
Been thanked: 167 times

Re: Automatic Screenshotter

Post by mouldy »

Just point of interest, that old windows program to do this all in one effort was called e-photocopy. It advanced the kindle app, took screen shots, and converted them to a pdf. Couple mentions of it in web search, but links were dead. So its history, either it didnt sell or author legally threatened or bought out. Did find one article of some guy that took his paperwhite kindle reader to library and literally photocopied a book page by page, yea he stuck the paperwhite kindle reader into the photocopy machine too be scanned, then bound the pages into an actual paper book. I can only imagine the time it took to do all this. Interesting mostly for fact that you can photocopy a paperwhite e-ink screen, the text is that clear.

Post Reply

Return to “WINE 32 Bit”