Skip to main content

BlueSky bookmarks ingestion toolkit: fetch, hydrate (article text, self-thread context, images), and merge into a JSON inventory.

Project description

bsky-saves

A toolkit for ingesting your own BlueSky bookmarks ("saves") into a portable JSON inventory, with optional hydration of linked article text, self-thread context, and image localization.

Why

The BlueSky web client lets you bookmark posts, but the saves are siloed inside the app. This tool pulls them out into a single JSON file you can read, archive, mirror, or build on top of.

It works for accounts hosted on bsky.social and on third-party AT Protocol PDSes (e.g. eurosky.social), because the bookmark fetch goes PDS-direct rather than through the AppView.

Install

pip install bsky-saves

Authenticate

Set two env vars from a BlueSky app password:

export BSKY_HANDLE=alice.bsky.social
export BSKY_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx
# Required only for accounts hosted on a third-party PDS:
export BSKY_PDS=https://eurosky.social

The default BSKY_PDS is https://bsky.social.

Use

# Pull all bookmarks → ./saves_inventory.json
bsky-saves fetch --inventory ./saves_inventory.json

# Hydrate every external-link bookmark with the linked article's text.
bsky-saves hydrate articles --inventory ./saves_inventory.json

# Hydrate every bookmark with same-author self-thread descendants.
bsky-saves hydrate threads --inventory ./saves_inventory.json

# Decode each save's post-creation timestamp from its rkey (offline).
bsky-saves enrich --inventory ./saves_inventory.json

# Localize cdn.bsky.app image references in any Markdown files under
# ./content/ into ./assets/<slug>/, rewriting the references in place.
bsky-saves hydrate images --stories ./content --assets ./assets

All commands are idempotent: running them again skips already-hydrated entries and adds only what's new. Failures are recorded inline (e.g. article_fetch_error) so subsequent runs don't pointlessly re-hit them.

Inventory schema

{
  "fetched_at": "2026-04-30T14:00:00Z",
  "saves": [
    {
      "uri": "at://did:plc:.../app.bsky.feed.post/abc123",
      "saved_at": "2026-04-29T22:11:00Z",
      "post_created_at": "2026-04-29T17:43:51Z",  // decoded from rkey
      "post_text": "...",
      "embed": {
        "type": "external",
        "url": "https://example.org/article",
        "title": "...",
        "description": "..."
      },
      "author": { "handle": "...", "display_name": "...", "did": "..." },
      "images": [
        { "kind": "image", "url": "https://cdn.bsky.app/...", "alt": "..." }
      ],
      "quoted_post": { /* optional, when the save quote-posts another post */ },

      // Added by `hydrate articles`:
      "article_text": "...",
      "article_published_at": "2025-09-13",
      "article_fetched_at": "...",

      // Added by `hydrate threads`:
      "thread_replies": [
        { "uri": "...", "indexedAt": "...", "text": "...", "images": [...] }
      ],
      "thread_schema_version": 3,
      "thread_fetched_at": "..."
    }
  ]
}

What about OAuth?

bsky-saves 0.1.x only supports the app-password authentication path. The OAuth + DPoP machinery for third-party PDSes lives in a separate package, atproto-oauth-py, and exists primarily for AppView-targeted resource calls that aren't reachable via PDS-direct auth. For BlueSky bookmarks the PDS-direct path (which bsky-saves uses) works regardless of where your account is hosted.

License

MIT. See LICENSE.

Provenance

Extracted from https://github.com/tenorune/tenorune.github.io's scripts/ directory, where it powered the Stories of 47 archive's BlueSky save ingestion. The Jekyll site itself stays in that repo; this is the reusable ingestion layer.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bsky_saves-0.1.0.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bsky_saves-0.1.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file bsky_saves-0.1.0.tar.gz.

File metadata

  • Download URL: bsky_saves-0.1.0.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bsky_saves-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e25aca8fc77797ae1ba029a71d9d8a8aadaa73abfd2b58cabfdb620c42096fc4
MD5 42cdd8416fdf81587ade056053013f52
BLAKE2b-256 fff3accde5b0ebde27f75ee8435b5105321f19e6f7fb1e4e4892a60c322a1efb

See more details on using hashes here.

Provenance

The following attestation bundles were made for bsky_saves-0.1.0.tar.gz:

Publisher: release.yml on tenorune/bsky-saves

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bsky_saves-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bsky_saves-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bsky_saves-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d154dad008a32f3c7019ba908e438feaec11b47978d924d975a51bc535c76cfa
MD5 2944c4148626b2e12d44a09ee1aca661
BLAKE2b-256 3264ff493eebbe2fecb88d0202d6aec10328c9a98d0c4db2bf876408426696ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for bsky_saves-0.1.0-py3-none-any.whl:

Publisher: release.yml on tenorune/bsky-saves

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page