Skip to main content

Backup and convert reMarkable tablet notebooks to PDF

Project description

RemarkableSync

GitHub GitHub release

CI Build Executables Release

Publish to PyPI PyPI version Homebrew

A comprehensive Python toolkit for backing up and converting reMarkable tablet notebooks to PDF with template support and proper folder hierarchy preservation.

[!IMPORTANT] This tool has been tested exclusively on reMarkable 2. Compatibility with reMarkable 1 is not guaranteed.

Features

๐Ÿ”„ Backup & Sync

  • USB Connection: Connects to reMarkable tablet over USB (10.11.99.1)
  • Incremental Sync: Only downloads files that have changed since last backup
  • Complete Backup: Backs up all notebooks, documents, and metadata
  • Template Support: Automatically backs up template files from the device
  • File Integrity: MD5 hash verification for synced files

๐Ÿ“„ PDF Conversion

  • Hybrid Converter: Supports both v5 and v6 .rm file formats
  • Template Rendering: Applies original notebook templates (grids, lines, etc.) to PDFs
  • SVG Pipeline: Uses rmc โ†’ SVG โ†’ PDF conversion for high quality output
  • Folder Hierarchy: Recreates original device folder structure in output
  • Single PDF per Notebook: Merges all pages into one PDF file per notebook
  • Smart Conversion: Only converts notebooks updated in the last backup
  • Progress Tracking: Visual progress bars and detailed logging

Prerequisites

  1. reMarkable Tablet Setup:

    • Connect your reMarkable tablet to your computer via USB
    • Enable SSH access (it's enabled by default)
    • Get your SSH password from Settings โ†’ Help โ†’ Copyright and licenses
  2. Python Requirements:

    • Python 3.11 or higher (required)
    • Required packages (install with pip install -r requirements.txt)
    • All dependencies including rmc are installed automatically

Installation

Option 1: Homebrew (Recommended for macOS)

macOS users can install RemarkableSync using Homebrew:

# Add the tap (one time only)
brew tap jeffsteinbok/remarkablesync

# Install RemarkableSync
brew install remarkablesync

This will automatically:

  • Install Python 3.13 and all dependencies (including rmc)
  • Set up everything needed for PDF conversion

Updating to latest version:

brew upgrade remarkablesync

Uninstalling:

brew uninstall remarkablesync
brew untap jeffsteinbok/remarkablesync

Option 2: pip (All Platforms)

For users with Python 3.11+ installed:

# Install using pip (recommended: use a virtual environment)
pip install remarkablesync

Updating to latest version:

pip install --upgrade remarkablesync

Option 3: Pre-built Executables (Windows/macOS)

For users without Python or who prefer standalone executables, download from the Releases page.

[!IMPORTANT] macOS Users: Use the included RemarkableSync.sh script to launch the application. This automatically handles macOS Gatekeeper security:

./RemarkableSync.sh

The script removes the quarantine flag and runs the executable. You can pass any command-line arguments:

./RemarkableSync.sh backup -v
./RemarkableSync.sh convert --sample 5

Option 4: From Source (For Developers)

  1. Clone this repository:

    git clone https://github.com/JeffSteinbok/RemarkableSync.git
    cd RemarkableSync
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Quick Start

The simplest way to get started:

  1. Connect your reMarkable tablet via USB
  2. Get your SSH password from Settings โ†’ Help โ†’ Copyright and licenses on your tablet
  3. Run RemarkableSync:
    # If installed via Homebrew (macOS)
    RemarkableSync
    
    # If using Python
    python3 RemarkableSync.py
    
  4. Enter your password when prompted (you can save it for future use)
  5. Your notebooks will be backed up to ./remarkable_backup/Notebooks/
  6. PDFs will be created in ./remarkable_backup/PDF/

That's it! The tool will only sync changed files and convert updated notebooks on subsequent runs.

Usage

Unified Command Line Interface

RemarkableSync provides a single entry point with three main commands:

Default Command: Sync (Backup + Convert)

The most common workflow - backs up your device and converts only updated notebooks:

# If installed via Homebrew
RemarkableSync

# If using Python
python3 RemarkableSync.py

This will:

  1. Connect to your ReMarkable tablet via USB
  2. Backup all changed files (including templates)
  3. Convert only notebooks that were updated in this backup

Individual Commands

Backup only (no conversion):

# Homebrew
RemarkableSync backup

# Python
python3 RemarkableSync.py backup

Convert only (from existing backup):

# Homebrew
RemarkableSync convert

# Python
python3 RemarkableSync.py convert

Sync with options:

# Force full backup and conversion (ignore sync status)
RemarkableSync sync --force-backup --force-convert

# Skip template backup
RemarkableSync sync --skip-templates

# Verbose output
RemarkableSync sync -v

Testing and Selective Conversion

Convert a single notebook (by name or UUID):

RemarkableSync convert --notebook "My Notebook"

Convert first N notebooks (for testing):

RemarkableSync convert --sample 5

Force convert all notebooks (ignore sync status):

RemarkableSync convert --force-all

Command Line Options

Common Options (all commands):

  • -d, --backup-dir: Directory for backups (default: ./remarkable_backup)
  • -v, --verbose: Enable debug logging
  • --version: Show version and repository information

Backup/Sync Options:

  • -p, --password: ReMarkable SSH password (will prompt if not provided)
  • --skip-templates: Don't backup template files
  • -f, --force / --force-backup: Backup all files (ignore sync status)

Convert Options:

  • -o, --output-dir: Output directory for PDFs (default: backup_dir/pdfs_final)
  • -f, --force-all / --force-convert: Convert all notebooks (ignore sync status)
  • -s, --sample N: Convert only first N notebooks
  • -n, --notebook NAME: Convert only specific notebook (by UUID or name)

How It Works

  1. Connection: Establishes SSH connection to ReMarkable tablet at 10.11.99.1
  2. File Discovery: Scans /home/root/.local/share/remarkable/xochitl/ for notebook files
  3. Template Backup: Downloads template files from /usr/share/remarkable/templates/
  4. Incremental Sync: Compares file metadata (size, modification time, hash) to determine what needs updating
  5. Download: Uses SCP to efficiently transfer only changed files
  6. PDF Conversion:
    • Converts .rm files to SVG using rmc (for v6 format)
    • Renders template backgrounds (grids, lines, dots)
    • Merges templates with notebook content
    • Combines all pages into single PDF per notebook
  7. Smart Updates: Tracks which notebooks changed and only converts those

File Structure

After backup, your directory will contain three clean folders:

remarkable_backup/
โ”œโ”€โ”€ Notebooks/                # All notebook files and metadata
โ”‚   โ”œโ”€โ”€ [uuid].metadata       # Document metadata files
โ”‚   โ”œโ”€โ”€ [uuid].content        # Document content info
โ”‚   โ””โ”€โ”€ [uuid]/               # Notebook directories
โ”‚       โ”œโ”€โ”€ [uuid]-metadata.json  # Page metadata
โ”‚       โ””โ”€โ”€ *.rm              # Drawing/writing data (v5 or v6 format)
โ”œโ”€โ”€ Templates/                # Template files from device
โ”‚   โ”œโ”€โ”€ *.png                 # Template preview images
โ”‚   โ”œโ”€โ”€ *.template            # Template definition files
โ”‚   โ””โ”€โ”€ templates.json        # Template metadata
โ”œโ”€โ”€ PDF/                      # Generated PDF outputs
โ”‚   โ””โ”€โ”€ [notebook folders with PDFs preserving hierarchy]
โ”œโ”€โ”€ sync_metadata.json        # Sync state tracking
โ”œโ”€โ”€ updated_notebooks.txt     # List of notebooks updated in last backup
โ””โ”€โ”€ .remarkable_backup.log    # Backup operation log

PDF Conversion Technical Details

RemarkableSync includes a hybrid converter that supports both v5 and v6 .rm file formats:

  • v6 Format (newer tablets): Uses external rmc tool to convert .rm โ†’ SVG โ†’ PDF
  • v5 Format (older tablets): Direct Python-based conversion (legacy support)
  • Template Rendering: Custom renderer applies original device templates with accurate scaling (226 DPI โ†’ 72 DPI PDF points)
  • Page Merging: Uses PyPDF2 to composite template backgrounds with notebook content

rmc Python Package

For v6 notebook conversion, RemarkableSync uses the rmc Python package:

  • Repository: https://github.com/ricklupton/rmc
  • Installation: Automatically installed as a dependency with RemarkableSync
  • Note: This is included in requirements.txt and installed via pip

Incremental Sync Details

The tool maintains a sync_metadata.json file that tracks:

  • File modification times
  • File sizes
  • MD5 hashes of local files
  • Last sync timestamps

Files are only downloaded if:

  • They don't exist locally
  • Remote modification time changed
  • Remote file size changed
  • Local file hash doesn't match stored hash

Troubleshooting

Connection Issues

  • Ensure ReMarkable is connected via USB
  • Verify the tablet shows up as network interface
  • Try pinging 10.11.99.1
  • Check SSH password from tablet settings

Permission Errors

  • Run as administrator on Windows if needed
  • Ensure backup directory is writable

File Access Issues

  • Restart ReMarkable tablet if SSH becomes unresponsive
  • Check available disk space on both devices

Security Notes

  • SSH password is requested interactively (not stored)
  • Uses paramiko with auto-add host key policy
  • Files are transferred over local USB network (not internet)

License

This tool is for personal use with your own ReMarkable tablet. Respect ReMarkable's terms of service.

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

remarkablesync-1.0.8.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

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

remarkablesync-1.0.8-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file remarkablesync-1.0.8.tar.gz.

File metadata

  • Download URL: remarkablesync-1.0.8.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for remarkablesync-1.0.8.tar.gz
Algorithm Hash digest
SHA256 a6374364fe5b230bd7f15cf8bff03adeb6c4bec0e13c8a9cc23e36af40688042
MD5 0f7730768651c1e15e60cccc735947cd
BLAKE2b-256 bc49dd04a29772bf727a18469db2b83a79c0990aad11260d33471dc60cfd36ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for remarkablesync-1.0.8.tar.gz:

Publisher: publish-pypi.yml on JeffSteinbok/RemarkableSync

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

File details

Details for the file remarkablesync-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: remarkablesync-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for remarkablesync-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 389dbf759f802bf98639f946016bc32931c0a14ff6a84d9c669e5b233d25a8a1
MD5 6f446a83f2e7586f4b2c49421f3476af
BLAKE2b-256 22118d2a73db5ce9df6e26c0fd727dddf4f6cd145e235a9193f2a7692e6eacbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for remarkablesync-1.0.8-py3-none-any.whl:

Publisher: publish-pypi.yml on JeffSteinbok/RemarkableSync

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