Skip to content

Add read/write support for image asset blocks#51

Draft
ionabio wants to merge 1 commit into
ricklupton:mainfrom
ionabio:codex/read-write-image-blocks
Draft

Add read/write support for image asset blocks#51
ionabio wants to merge 1 commit into
ricklupton:mainfrom
ionabio:codex/read-write-image-blocks

Conversation

@ionabio
Copy link
Copy Markdown

@ionabio ionabio commented May 6, 2026

Summary

Add support for two newer reMarkable v6 block shapes seen in native notebook image insertion:

  • SceneAssetBlock for top-level asset references (0x0E), exposing the referenced image filename when present.
  • ScenePathItemBlock for path-like scene items (0x0F, item type 0x07), preserving the currently-undecoded payload as scene_items.Path.

This keeps image-containing native notes from falling back to UnreadableBlock and allows the new blocks to be written back without losing data.

Notes

The exact field names and semantics for these blocks are still not fully decoded. The implementation is intentionally conservative: it parses enough to identify image asset filenames and keeps the remaining payload bytes intact for round-trip safety.

Validation

  • python -m pytest tests/test_scene_stream.py -q
  • python -m pytest -q
  • Locally verified an image-containing .rm page now parses with one SceneAssetBlock, path item blocks, and zero UnreadableBlocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant