Giter VIP home page Giter VIP logo

remarkable-sink's Introduction

logo

Ultra-simple node app that uploads files from a folder to your reMarkable Tablet thanks to RmApi & watchman. It can be used for simple dnd transfer and can be useful in many other automated applications.

Demo video: https://www.youtube.com/watch?v=SX8s0wqZ2ks&feature=youtu.be

⚠️ Files placed in the folder will be uploaded then deleted ⚠️

Installation

1 - Clone & install repo

git clone https://github.com/hmenzagh/reMarkable-Sink && cd reMarkable-Sink && yarn

2 - Install watchman

3 - Install & Configure RmApi

Don't forget to run & set your one-time code !

4 - Setup .env file

PATH_TO_RMAPI='/Users/hmenzagh/go/bin/rmapi'
SINK_FOLDER_PATH='/Users/hmenzagh/Desktop/reMarkable-Sink' # Must be an absolute path
REMARKABLE_FOLDER='Sink' # To create in top-level reMarkable folder

5 - Do a quick test with yarn start

Done 🎉 (don't forgat to exit the process before setting up daemon)

Run at startup

MacOS

(Tested on Big Sur)

1 - Update com.remarkable-sink.hmenzagh.plist

Change line :15 to reflect your folder absolute path

2 - Install Brew

Setup command as of 11/2020

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

3 - Install bash

brew install bash

⚠️ This is needed because of MacOS's SIP that prevents reMarkable-Sink from deleting/reading the PDFs properly and causes EPERM errors. The other option is to disable SIP witch is not recommended for most users.

4 - Install forever

npm install forever -g

5 - Move the plist to Launch LaunchAgents

mv com.remarkable-sink.hmenzagh.plist ~/Library/LaunchAgents/.

6 - Start the daemon

launchctl load ~/Library/LaunchAgents/com.remarkable-sink.hmenzagh.plist
launchctl start com.remarkable-sink.hmenzagh

or restart the computer !

(launchctl load can fail and is a known issue with Big Sur, in this case you should restart)

Linux

(Alternatively you can setup a crontab)

1 - Install PM2

sudo npm install pm2 -g

2 - Start reMarkable-Sink

pm2 start index.js -n reMarkable-Sink

3 - Save setup

pm2 save

4 - Set at startup

sudo pm2 startup and follow instructions if needed !

Limitations

  • Only accepts PDFs < 50mo
  • The user that executes index.sj needs to be the user that is logged in with RmAPI

remarkable-sink's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tunayan

remarkable-sink's Issues

Problem syncing

Hello Hugo, hello everybody
thanks for developing and publishing this great tool!
However, i cannot make it work - and maybe someone has the same problem, too. May I please ask for help?

After starting with $ yarn start, it's not transfering any files. Console output is as followed:

yarn start
yarn run v1.22.19
warning package.json: License should be a valid SPDX license expression
$ node index.js
Watch established on /media/1_5tb/samba/nexus/RM_Sink

the file ".env" in reMarkable-Sink main folder has the following output via $ cat /home/pi/reMarkable-Sink/.env

PATH_TO_RMAPI='/home/pi/go/bin/rmapi'
SINK_FOLDER_PATH='/media/1_5tb/samba/nexus/RM_Sink/'
REMARKABLE_FOLDER='Sink'

There is a .pdf-file in my sink-folder (/media/1_5tb/samba/nexus/RM_Sink/) which is below about 42kb in size.

$ ls -lh /media/1_5tb/samba/nexus/RM_Sink/
insgesamt 44K
-rwxrwxrwx 1 pi pi 42K 31. Aug 16:29 TicketReturn.pdf

As watchman watches changes, deleting, re-adding the file doesn't make any progress.
I can successfully start rmapi with $ /home/pi/go/bin/rmapi and manually added a folder "Sink" after nothing was happening, which did pop up on the reMarkable-Device shortly after, so syncing with the cloud is working fine.

$ watchman watch /media/1_5tb/samba/nexus/RM_Sink/ results in:

{
    "watch": "/media/1_5tb/samba/nexus/RM_Sink",
    "watcher": "inotify",
    "version": "4.9.0"
}

Do I have to make any other things with watchman than watch the sink-folder? Like use trigger or something?

The reMarkable-Account Name from https://my.remarkable.com/settings is [email protected]
Is this ment, when you state:

The user that executes index.sj needs to be the user that is logged in with RmAPI

..because the local user-accout is "pi".
Is this my problem? How do I find out, which user is logged in rMAPI?

The system is a Raspbian Linux 11 (bullseye) on a Pi4.
From your Installation steps I finished No 1 Clone &Install repo.
For No 2 watchman: I installed it via "apt get install watchman" as with prebuilt binaries i couldn't even start watchman $ watchman -bash: /usr/local/bin/watchman: cannot execute binary file: Exec format error, however as I said above, now it's working via "apt".

Any ideas how I can improve the situation?
Thank you a lot!

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.