morrolinux / KindleCalendar

Selenium automation to screenshot calendar and view it on kindle
34 stars 6 forks source link

Screenshots streaming #7

Open StarNumber12046 opened 2 years ago

StarNumber12046 commented 2 years ago

The screenshot.png file should be a screenshot sent from a device. If the device is not the host, the screenshot should be streamed to the raspberry (maybe over HTTP?)

morrolinux commented 2 years ago

As of now, the screenshot to be "pinned" on the Kindle is copied over the Pi via scp right after taking the screenshot, like so: scp -i ~/.ssh/id_rsa_raspi ~/screenshot.png pi@192.168.1.84:KindleCalendar/

On the Pi is a file watcher looking for changes so it will notice the new screenshot and pin it to the Kindle.

A perhaps better way to do this is to send the screenshot to the Pi via HTTP upload or something like this, feel free to implement this if you can and want.

StarNumber12046 commented 2 years ago

I used a python script to upload it and allowed me to take custom regions for the screenshot

StarNumber12046 commented 2 years ago

I will make it more prod-ready and open a PR

morrolinux commented 2 years ago

Taking a custom region and uploading it doesn't require a custom program, a custom launcher or key binding is more than enough for that. What I'm more interested in seeing is an http upload method implemented on the node web server, so we can get rid of the scp upload

StarNumber12046 commented 2 years ago

Yes, it should be useful. Also, my implementation is cross os-compatible

LightYagami28 commented 1 year ago

Close this issues