Giter VIP home page Giter VIP logo

remarkable2-tools's Introduction

reMarkable 2 - Python Tools - WebUI

Description

As reMarkable Team doesn't provide any official GNU/Linux tools or software, we are forced to use SSH or, a less aggressive option, USB Web Interface through its USB-C port.

These tools are intend to be simple. Do not expect much from them. In order to work connect your device via USB-C to your computer and unlock it. Be sure "USB web interface" is enabled, its switch can be found at Settings » Storage.

Version info and commands

Commands: ls, download, upload reMarkable2 version tested: 2.4.1.30

Usage Screenshot

reMarkable 2 - Python Tools -example

Usage (with aliases):

More info on how to set them up in Installation

reMarkable 2 - Python Tools -example

Installation

Create and load python virtual environment (optional)

python3 -mvenv venv
source venv/bin/activate
pip install -r requirements

Warning: if you use this option, you must activate it before using this scripts or call python binary from venv directory

Create shell aliases

  • if you have created a virtual env, load it first!
  • Open a shell and cd into scripts/this repository main dir; execute next commands
cat <<EOF
alias remarkable2_ls="$(which python3) ${PWD}/ls.py"
alias remarkable2_download="$(which python3) ${PWD}/download.py"
alias remarkable2_upload="$(which python3) ${PWD}/upload.py"
alias remarkable2_get="$(which python3) ${PWD}/download.py"
alias remarkable2_put="$(which python3) ${PWD}/upload.py"
EOF
  • add output lines to your ${HOME}/.bash_aliases (or check for your favourite shell)
  • This should allow you to use these commands from any "current path" like:
remarkable2_ls 

Commands

list (ls) script

Script called ls will allow listing directories and getting objects UUIDs generated from WebUI

python ls.py

If no UUID is specified it will aim for root directory.

python ls.py DIRECTORY_UUID

download script

python download.py UUID # will download reMarkable's reported filename for that UUID into current directory 
python download.py UUID ../ # will download reMarkable's reported filename for that UUID into parent directory
python download.py UUID /tmp/ # will download reMarkable's reported filename for that UUID into /tmp directory
python download.py UUID /tmp/filename.pdf # will download reMarkable's file at /tmp/filename.pdf (don't mess up with extensions)
python download.py UUID new_filename.pdf # will download reMarkable's file at current directory with as filename.pdf

Keep in mind if second parameter is in directory expression (ex. /mydir/), it must exist.'

Example of downloaded file

reMarkable 2 - Python Tools - download example

upload script

python upload.py "file to upload.pdf"
python upload.py "file to upload.pdf" "Second File To Upload"

To consider on upload:

  • These scripts ain't using any argument parser, so be careful.
  • USB Web Interface always uploads to root storage, so you gotta move files later but they'll show up immediately.
  • Restricted upload to ".pdf" and ".epub" extensions, just to be a little bit careful.

remarkable2-tools's People

Contributors

droberin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.