Job to periodically fetch missing bookmark screenshot cover photos. This Github Action uses Playwright to periodically fetch missing screenshots of saved Bookmarks.
See also:
To run this yourself, you'll need a Github account and a few environment variables. These include a DATABASE_URL
to your Briefkasten database. As well as the connection details to your image hosting service, in this case ImageKit.
- Clone the repository
$ git clone ssh://github.com/ndom91/briefkasten-scrape
$ cd briefkasten-scrape
- Install dependencies
$ npm install
- Build Docker container
$ docker build . -t briefkasten-scrape:latest
- Run container
$ docker run --rm -d --name briefkasten-scrape \
-e SUPABASE_KEY="${{ secrets.SUPABASE_KEY }}" \
-e SUPABASE_URL="${{ secrets.SUPABASE_URL }}" \
-e DATABASE_URL="${{ secrets.DATABASE_URL }}" \
-e BOOKMARKS_CHUNK="${{ secrets.BOOKMARKS_CHUNK }}" \
briefkasten-scrape:latest
This will execute and fetch the first 5 Bookmarks with missing cover images and attempt to capture them with Playwright. They will be uploaded to your image store of choice and then displayed for the user the next time they open their Briefkasten.
Open to all contributions, please stick to formatting settings in your PR though!
MIT