A C++ file API for the reMarkable e-ink tablet.
Warning: The libraries and tools in this project are not (yet) hardened for malicious input. Only process files that you can trust with it!
- A C++11 capable compiler such as
- GCC 4.8+ (tested)
- Clang 3.9+ (tested)
- CMake 3.7+
- PNGwriter 0.7.0+
(optional for png converts; extend environment variable
CMAKE_PREFIX_PATHwith its install location)
spack install rmlab
spack load rmlabIf one of the popular user-level package managers above is not already satisfying your needs, install from source via:
git clone https://github.com/ax3l/lines-are-beautiful.git
mkdir lines-are-beautiful/build
cd lines-are-beautiful/build
# for own install prefix append: -DCMAKE_INSTALL_PREFIX=$HOME/somepath
cmake ..
make -j
# optional
make test
# sudo is only required for system paths
sudo make installLines Are Beautiful comes with several tools to handle files produced by the tablet.
Try them on your own files inside $HOME/.local/share/remarkable/xochitl/ :-)
This is a small example implementing a renderer for PNG while changing the brush type.
# path to the directory containing the notebook
lines2png share/rmlab/examples/aa90b0e7-5c1a-42fe-930f-dad9cf3363cc
# creates files "test-0.png", "test-1.png", ... per page in the current directoryNote: this tool depends on an installed PNGwriter dependency.
This notebook renderer creates a set of SVG files, one for each page. Implementation status:
- Basic strokes.
- Initial brush size.
- Brush color.
- Highlighter.
- Normal eraser.
- Region eraser.
- Layers.
- Brush size variation based on pressure/tilt.
- Brush texture.
# path to the directory containing the notebook
lines2svg share/rmlab/examples/e09e6bd4-3647-41e7-98be-b9c3b53d80c8
# creates files "test-0.svg", "test-1.svg", ... per page in the current directorySet environment hints:
# optional: only needed if installed outside of system paths
export CMAKE_PREFIX_PATH=/your/path/to/installed/path:$CMAKE_PREFIX_PATHAdd to your CMakeLists.txt:
# supports: COMPONENTS PNG
find_package(Rmlab 0.1.0 CONFIG)
target_link_libraries(YourTarget PRIVATE Rmlab::Rmlab)Alternatively, add whole repository directly to your project and add it via:
add_subdirectory("path/to/source/of/lines-are-beautiful")
target_link_libraries(YourTarget PRIVATE Rmlab::Rmlab)In your C++ files (see Doxygen):
#include <rmlab/rmlab.hpp>
#include <iostream>
// ...
rmlab::Notebook myNotebook("share/rmlab/examples/aa90b0e7-5c1a-42fe-930f-dad9cf3363cc");
for( auto & page : myNotebook.pages )
for( auto & layer : page.layers )
for( auto & line : layer.lines )
for( auto & point : line.points )
std::cout << point.x << " " << point.y << std::endl;- general
- file format
- 5' talk at 34C3 [en]:
- talk at Datenspuren 2018 [de]:
- every C++ programmer likes to learn Rust: lines-are-rusty
This is a hobby project.
The author(s) and contributor(s) are not associated with reMarkable AS, Norway. reMarkable is a registered trademark of reMarkable AS in some countries. Please see https://remarkable.com for their product.