Created by Pavel KlavĂk
We need to add a few variables:
It will update all new dependencies. We are not changing them often, so it should be finished immediately.
node screenshot.js
We need to add this as a service, so we can do systemctl screenshot start, etc. Environment variables need to be shared.
It is done as part of uberjar compilation:
shadow-cljs release screenshot
Generates screenshot/screenshot.js.
Together with package.json and config.edn in screenshot directory.
So we don't see changes in the screenshot when someone is still working on the Orgpage.
Should be relatively easy using this library:
https://sharp.pixelplumbing.com/
Instead of rounding it, so we see as much as possible.
When screenshot=true is set, remove panel and all popups.
Also, add #screenshot into DOM when Orgpage is loaded.
Without Shadow-cljs, there it should be even simpler.
https://gist.github.com/apeckham/ec1725b22642d9344e294c701de18fb2
Assuming that the Orgpage is public or a valid token is passed within the URL.
https://github.com/puppeteer/puppeteer
https://bitsofco.de/using-a-headless-browser-to-capture-page-screenshots/
We want to run it on localhost:3100. It should be accessible only from local machine (i.e., OrgPad server), not from outside. (At least for this moment.)
After checking that you can access this resource.
Maybe we can build it with this: https://macchiato-framework.github.io/. We don't really need much from it anyway.
After every change, the screenshot is generated in 5 minutes. Further changes do not postpone this.
Containing orgpage-id and read access token.