mirror of
https://gitlab.com/Anson-Projects/projects.git
synced 2026-06-04 05:10:26 +00:00
ghost-upload
This tool uploads posts from https://projects.ansonbiggs.com to https://notes.ansonbiggs.com.
What's new:
- Uses the Ghost Admin API to check for existing posts by slug instead of probing the public site.
- Optional update support: set
UPDATE_EXISTING=trueto update an existing post in-place (viaPUT /ghost/api/v3/admin/posts/{id}?source=html). - Safer slug handling (trims trailing
/and falls back to the last path segment).
Env vars:
admin_api_key: Ghost Admin API key inkey_id:secretformat.kagi_api_key: Kagi Summarizer API key.UPDATE_EXISTING(optional): iftrue/1, update posts that already exist in Ghost.
Notes:
- Updates use optimistic concurrency by sending the current
updated_atfrom Ghost. If someone edits a post in Ghost after we fetch it, the update will fail with a 409 and be reported in the console. - Summaries are always regenerated when creating or updating; if you want to avoid re-summarizing on updates, leave
UPDATE_EXISTINGunset.