Giter Site home page Giter Site logo

rmapi's Introduction

rMAPI

Warning: If you installed rmapi before (October 1, 2018), you will need to install the latest version, otherwise rmapi will fail to authenticate after the changes in the server API that were introduced in September 28, 2018.

rMAPI is a Go app that allows you to access the ReMarkable Cloud API programmatically.

You can interact with the different API end-points through a shell. However, you can also run commands non-interactively. This may come in handy to script certian workflows such as taking automatic backups or uploading documents programmatically.

Experimental: Apart from the interactive shell, there's some work happing to access the documents through a FUSE system. You can read further at the bottom of this file.

Console Capture

Some examples of use

Tutorial on how to directly print to your reMarkable on Mac with rMAPI

Install

From sources

Install and build the project:

go get -u github.com/juruen/rmapi

Binary

You can download an already built version for either Linux or OSX from releases.

API support

  • list files and directories
  • move around directories
  • download a specific file
  • download a directory and all its files and subdiretores recursively
  • create a directory
  • delete a file or a directory
  • move/rename a file or a directory
  • upload a specific file
  • live syncs

Shell ergonomics

  • autocomplete
  • globbing
  • upload a directory and all its files and subdirectories recursively

Commands

Start the shell by running rmapi

List current directory

Use ls to list the contents of the current directory. Entries are listed with [d] if they are directories, and [f] if they are files.

Change current directory

Use cd to change the current directory to any other directory in the hiearchy.

Upload a file

Use put path_to_local_file to upload a file to the current dirctory.

You can also specify the destination directory:

put book.pdf /books

Recursively upload directories and files

Use mput path_to_dir to recursively upload all the local files to that directory.

E.g: upload all the files

mput /Papers

Console Capture

Download a file

Use get path_to_file to download a file from the cloud to your local computer.

Recursively download directories and files

Use mget path_to_dir to recursively download all the files in that directory.

E.g: download all the files

mget .

Create a directoy

Use mkdir path_to_new_dir to create a new directory

Remove a directory or a file

Use rm directory_or_file to remove. If it's directory, it needs to be empty in order to be deleted.

You can remove multiple entries at the same time.

Move/rename a directory or a file

Use mv source destination to move or rename a file or directory.

Stat a directory or file

Use stat entry to dump its metadata as reported by the Cloud API.

Run command non-interactively

Add the commands you want to execute to the arguments of the binary.

E.g: simple script to download all files from the cloud to your local machine

$ rmapi mget .

rMAPI will set the exit code to 0 if the command succeedes, or 1 if it fails.

Access documents through a mounted FUSE file system

We have started to add support to access your rM documents through a FUSE file system.

This support is very alpha and only a few operations are supported by now:

  • Mount/umount
  • Lookup entry
  • Rename
  • Rmdir
  • Unlink
  • Read files
  • Write files
  • Live update

If you want to give it a go, you can run:

rmapi --fuse-mount mount_point

rmapi's People

Contributors

juruen avatar satyajithj avatar peerdavid avatar pcl avatar

Watchers

James Cloos avatar  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.