This is a Cloudflare worker that scrapes a STAC catalogue containing the Copernicus Sentinel-2 L2A data. It then publishes metadata records on ATProto.
npx wrangler kv namespace create STATE
You can put the environment variables into a .env file.
CLOUDFLARE_ACCOUNT_ID=8a53d9807182ed15692b1a3f4c12af96
CLOUDFLARE_API_TOKEN="mFmOTYwZjBjMTQ2OGUxY_TQ0YTk2NWYxYzljYTVj"
[email protected]
BLUEKSY_PASSWORD=Averysecurepassword
To run the worker locally:
npm run dev
You can then trigger it via
curl -X GET http://localhost:8787/doit
When changing the wrangler.jsonc configuration, re-run the types generator:
npm run cf-typegen
Deploy it to Cloudflare:
npm run deploy
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.