Skip to content

ndom91/briefkasten-scrape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📸 Briefkasten Image Job

GitHub Workflow Status Demo

Job to periodically fetch missing bookmark screenshot cover photos. This Github Action uses Playwright to periodically fetch missing screenshots of saved Bookmarks.

See also:

🚀 Getting Started

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.

  1. Clone the repository
$ git clone ssh://github.com/ndom91/briefkasten-scrape
$ cd briefkasten-scrape
  1. Install dependencies
$ npm install
  1. Build Docker container
$ docker build . -t briefkasten-scrape:latest
  1. 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.

🏗 Contributing

Open to all contributions, please stick to formatting settings in your PR though!

📝 License

MIT