This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
tech:filesystem [2018/02/11 13:16] splitbrain created |
tech:filesystem [2021/01/08 21:01] axelson [Lines file format] |
||
---|---|---|---|
Line 255: | Line 255: | ||
* All integer values are stored over 4 little-endian bytes. | * All integer values are stored over 4 little-endian bytes. | ||
- | * The file starts with the plain text <code>reMarkable lines with selections and layers</code> | + | * The file starts with plain text. Depending on the version it differs. For earlier versions: <code>reMarkable lines with selections and layers</code> For later versions: <code>reMarkable .lines file, version=3</code> <code>reMarkable .lines file, version=5</code> |
- | * Offset 0x2c-0x2f: The number of pages in the notebook (little endian) | + | * //[only before version 3 (or even earlier?)] // Offset 0x2c-0x2f: The number of pages in the notebook (little endian) |
* [Repeated for each page | * [Repeated for each page | ||
* 4 bytes: The number of layers in the page (1 to 5). The last 3 bytes are 00. | * 4 bytes: The number of layers in the page (1 to 5). The last 3 bytes are 00. | ||
Line 266: | Line 266: | ||
* <4 unknown bytes> 0000 0000 (The value is different for strokes coming from the "Move, scale, rotate & copy" tool) | * <4 unknown bytes> 0000 0000 (The value is different for strokes coming from the "Move, scale, rotate & copy" tool) | ||
* 4 bytes: Pen width used (1.875:small; 2:medium; 2.125:large) Other values can occur after scaling. | * 4 bytes: Pen width used (1.875:small; 2:medium; 2.125:large) Other values can occur after scaling. | ||
+ | * //[version=5 only]// <4 unknown bytes> | ||
* 4 bytes: Number of segments in the stroke | * 4 bytes: Number of segments in the stroke | ||
* [Repeated for each segment of the stroke | * [Repeated for each segment of the stroke | ||
Line 282: | Line 283: | ||
* A stroke is from the moment you put the stylus on the device, to the moment you remove the stylus from the device. It forms a line. A segment is a fraction of that stroke. Note that the tiniest dot you can draw on the device already has several segments. | * A stroke is from the moment you put the stylus on the device, to the moment you remove the stylus from the device. It forms a line. A segment is a fraction of that stroke. Note that the tiniest dot you can draw on the device already has several segments. | ||
* The parser knows how many pages/layers/strokes/segments it expects, so it just stops reading after that point. There is no byte used to signal that a stroke/layer/page is over before starting to parse the next. | * The parser knows how many pages/layers/strokes/segments it expects, so it just stops reading after that point. There is no byte used to signal that a stroke/layer/page is over before starting to parse the next. | ||
- | * According to Axel Hübl the last 8 bytes of the stroke have a different meaning: 4 bytes: pen rotation to X axis, 4 bytes: pen rotation to Y axis. See his blog post: [https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/reMarkable-lines-file-format.html reMarkable .lines File Format] | + | * According to Axel Hübl the last 8 bytes of the stroke have a different meaning: 4 bytes: pen rotation to X axis, 4 bytes: pen rotation to Y axis. See his blog post: [[https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/reMarkable-lines-file-format.html| reMarkable .lines File Format]] |
+ | |||
+ | Libraries/code parsing the format: | ||
+ | |||
+ | * https://github.com/ax3l/lines-are-beautiful (C++; version 3 only) | ||
+ | * https://github.com/ax3l/lines-are-rusty (Rust; version 3 and 5) | ||
+ | * https://github.com/bordaigorl/remy/blob/master/remy/remarkable/lines.py (Python; version 3 and 5) | ||
+ | * https://gist.github.com/felixr/3b766811f5b4c6692aa15561bc25db1c (https://kaitai.io ; version 3 and 5) | ||
===== Notable folders ===== | ===== Notable folders ===== |