GithubHelp home page GithubHelp logo

chrihart / google-drive-remarkable-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bsdz/google-drive-remarkable-sync

0.0 0.0 0.0 23 KB

Apps Script library for synchronising Google Drive folder with Remarkable reader.

License: MIT License

JavaScript 100.00%

google-drive-remarkable-sync's Introduction

google-drive-remarkable-sync

Apps Script library for synchronising Google Drive folder with Remarkable cloud storage.

Files kept in Remarkable's cloud storage are automatically syncronised with your Remarkable device.

Thanks to splitbrain who did the initial reverse engineering of Remarkable's cloud API.

Installation

  1. Go to https://script.google.com and click on "New Project". Click in menu "File/Rename" and provide suitable name, eg "Sync Google Drive Books to Remarkable".

    1. Option 1 - Include library from Apps Script Click in menu "Resources/Libraries" and in "Add a library" paste "1_ftsHelqnCqBXAwFAOv3U-WUUm_n3_nENg7n6BrDDzze7EekBD9vmf-0" without the double quotes. In version drop down choose "Stable - with syncMode" Then press "Save" button.

    2. Option 2 - Copy the code files from this repository into your Apps Script project being careful to rename the *.js files to *.gs files.

  2. Create a folder at top level in your Remarkable device called "Google Drive".

  3. In your Code.gs file paste the following code:

     function run_sync() {
       // one time code from https://my.remarkable.com/connect/mobile
       let rOneTimeCode = "abcdwxyz";
       let gdFolderSearchParams = "title = 'Books' and mimeType = 'application/vnd.google-apps.folder'";
       let syncMode = "mirror";
       RemarkableGoogleDriveSyncLib.syncGoogleDriveWithRemarkableCloud(rOneTimeCode, gdFolderSearchParams, "Google Drive", syncMode);
     }
    

    Change the rOneTimeCode to include a one time code obtained from https://my.remarkable.com/connect/mobile. Also change the name "Books" in gdFolderSearchParams to the name of your Google Drive folder that contains your relevant PDFs. You can also replace the gdFolderSearchParams with a Google Drive folder ID. syncMode can be either "update" or "mirror" with mirroring also deleting files from Remarkable device if not found in same location on Google Drive.

  4. Click the menu "Run/Run function/run_sync"; you will be prompted for Authorization. Click Review Permissions and select your Google account. You will be prompted that the app isn't verified. Click the Advanced hyperlink and choose "Go to (unsafe)". Choose Allow to the permissions shown.

  5. View the execution log of your project to check everything appears to be working.

  6. Set up a regular trigger by click in menu "Edit/Current project's triggers". Click "+ Add Trigger" button. Choose run_sync function and select "Time-driver", "Hour timer", "Every hour" and "Notify me daily" then press Save.

That should be it!

Limitations

  • This is a one way sync from Google Drive to Remarkable.
  • Files greater than 50MB in size are not transferred. This appears to be a limit set by reMarkable.
  • Currently, only PDF files are transferred. Adding support for EPUB and other types isn't difficult and might be added later.

google-drive-remarkable-sync's People

Contributors

bsdz 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.