Python library to read v6 files from reMarkable tables (software version 3).
In particular, this version introduces the ability to include text as well as drawn lines. Extracting this text is the original motivation to develop this library, but it also can read much of the other types of data in the reMarkable files.
To convert rm files to other formats, you can use rmc, which combines this library with code for converting lines to SVG, PDF, and simple Markdown.
Fixes:
CrdtSequence
(#36)SceneGroupItemBlock
(#16) New features:
0x0D
(SceneInfo) and 0x08
(SceneTombstoneItemBlock) (#24)move_id
field on some SceneLineItems (#24)Breaking changes:
start
property of GlyphRange
items is now optional
(#15).BoldSpan
and ItalicSpan
, the
CrdtStr
objects now have optional text properties like
font-weight
and font-style
. This simplifies the parsing code and
the resulting data structure.New features:
UnreadableBlock
containing the data that could not be read, so
that parsing of other blocks can continue.read_bool_optional
and similar of TaggedBlockReader
which return a default value if no matching tagged value is present
in the block.Other changes and fixes:
value
attribute of scene item blocks, which was not being used, has been
removed.expand_text_items
.Breaking changes:
scene_items.TextFormat
to ParagraphStyle
to better describe its
meaning, now that we have inline bold/italic text styles.scene_items.Text
object; use text.TextDocument
instead.{"version": "3.2.2"}
options to write_blocks
. This allows us to
continue to test round-trip reading and writing of old test files as new data
values are added. Replaces "line_version"
option.New features:
Other changes:
CrdtSequence
type to handle the different places that CRDT
sequences are used, not just for text.scene_items
module with data structures representing the data,
independently from the Block
s used to serialize them to .rm
files.SceneTree
structure which holds the SceneItem
s in
groups/layers.RootTextBlock
to scene_items.Text
class, which
includes methods for extracting lines of text and formatting.GlyphRange
scene items, representing highlighted text in PDFs.read_block
and read_subblock
methods.https://github.com/ddvk/reader helped a lot in figuring out the structure and meaning of the files. @adq discovered a means to get debug output (see issue 25) which is very helpful for understanding the format.
Contributors: