Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

repush.sh

Patrick Pedersen edited this page Jan 17, 2018 · 18 revisions

Source

Note: In order for this script to work, the reMarkable web interface must be enabled first under device settings > storage

A host sided script that can push one or more provided documents to the reMarkable via the web client trough USB or remotely trough SSH.

Dependencies

In order for this script to function as intended, the following software must be available on the host machine

Supported document types

  • PDF
  • EPUB

Usage

Usage: repush.sh [-o output] [-d] [-r ip] [-p port] doc1 [doc2 ...]

Options:
-o			Output directory to which the provided files will be uploaded to
-d			Delete file after successful push
-r			Push remotely via ssh tunneling
-p			If -r has been given, this option defines port to which the webui will be tunneled (default 9000)

Examples

Push test1.pdf and test2.pdf while the device is connected trough USB

$ bash repush.sh test1.pdf test2.pdf

Push test1.pdf and test2.pdf remotely. This example assumes the devices network ip is 10.0.0.43.

$ bash repush.sh -r 10.0.0.43 test1.pdf test2.pdf

Push test1.pdf and test2.pdf to /Test/Directory/

$ bash repush.sh -o /Test/Directory test1.pdf test2.pdf

Usage Guide

This guide attempts to describe an typical execution of this script

1. Downloading/Installing the script

To download this script, we'll be using wget, a application present on most bash compatible systems by default

wget https://github.com/reHackable/scripts/raw/master/host/repush.sh

From here on, you may opt to copy the script to a path defined in the $PATH variable so that it can be executed directly from the terminal

2. Executing the script

It is important to note, that the device must remain unlocked until the script has completed

In this scenario we're going to remotely push test.pdf to the device. For the sake of simplicity, we'll assume that the LAN ip of our device is 192.168.42.255

bash repush.sh -r 192.168.42.255 test.pdf

Successfully established connection, please do not lock your device until the script has completed!

========================
Initiating file transfer
========================

Pushing 'Test.pdf'...
Test.pdf: Success

Exit request sent.
Successfully transferred 1 out of 1 documents

3. Done

If we were to check the device, we'd a new document by the name of Test!

Clone this wiki locally