Remarkable's local A.P.I. and web interface are slow and lack essential features. I don't like cloud services and I couldn't find a script that worked, so I wrote my own. This is a work in progress but it already works very well for me. Please report any issues-- there may be differences between product models, software versions, and personal workflows.
- Remarkable Paper Pro (3.24.0.149)
- Bash (probably at least version 5.0).
- ssh.
- rsync.
- jq.
- find.
- sed.
Syntax, operations, parameters, and some introductory notes are all output by remarkable-ssh help. In fact, the help is optional. What I have written here is intended to give prospective users a sense for what this script can do.
Helpby printing usage information.Cachescope operations.Pushcache directory to Remarkable device.Diff(rsync format)
Pullfrom Remarkable device to cache directory.Diff(rsync format)
Diff(neutral table format)
Listobjects, optionally within a folder and with optional recursive depth limit.Addfiles of supported types.Renameobjects.Deleteobjects.Make folderobjects.Move objectswith respect to folders.
Pathto cache directory.- S.S.H.
hostvalue for Remarkable device. Configfile path.- Do
not addnew things. - Do
not deleteanything. Only addnew things.Only deleteremoved things.Include unsupportedfile types.
Running cache push or cache push without any sync-related parameters will perform a full sync, including additions, deletions, and updates. Only updates can be achieved by specifying both --no-add and --no-delete.
For this script to work, you will need S.S.H. access to your Remarkable device.
In theory, this should work on any operating system so long as the dependencies listed above are available. I do not know what Windows Subsystem for Linux provides. I have described the requirements for and process of connecting to Remarkable devices from a Linux host here. Note that distribution kernels probably already support the necessary drivers and do not need to be rebuilt.
Once you've downloaded this script, run its help operation to get started. You are responsible for knowing what the commands you run will do. I strongly suggest running the diff sub-operations before any push or pull operations. This prints out what changes would be made without actually making them.
You may also want to create a backup of the files on your device. That can be achieved by running remarkable-ssh --cache=<path_to_backup_directory> --host=<ssh_target> --unsupported-files cache pull, where the backup cache directory specified is different from the cache directory you will normally be using. If you need to restore from the backup directory, just run the same command with push instead of pull.
Since the --cache and --host parameters must be specified for many operations, most users will want to define them in the optional config file.
Unless otherwise specified (by the --config parameter), the script will look for a file named "remarkable-ssh.conf" in either "$XDG_CONFIG_HOME" (if defined) or (otherwise) "~/.config".
The config file syntax is very simple:
- Lines must take the form of:
<parameter_name>[=<value>] - Whitespace leading and trailing each line is trimmed.
- Whitespace surrounding the '=' symbol is trimmed.
- If the first non-whitespace character on a line is the '#' symbol, the line is ignored.
- If the first two characters in a value string are a tilde (~) and then forward slash, the tilde is expanded.