Giter Site home page Giter Site logo

mendeley-rmsync's Introduction

Remarkable Support for Mendeley

This tool syncs PDFs from a folder in Mendeley Reference Manager with a folder in Remarkable Cloud (which ultimately ends up in your tablet if it is connected).

What does it do, exactly?

It takes files in a specified folder in Mendeley and makes sure that it matches with a folder in Remarkable. Both folder names are hard-coded right now, feel free to change them locally before running the script. And make sure the folders actually exist in both places!

Note that Mendeley's folder provides the ground truth, so any files not in Mendeley will be removed from Remarkable. And naturally, any new files added to Mendeley will be sent to Remarkable. For existing files at both places, it syncs the latest copy (with annotations) from Remarkable to Mendeley.

How to run

The sync is not automatic right now, you need to run this script (after the One-time Setup below) everytime you want to synchronize:

git clone https://github.com/anilkyelam/mendeley-rMsync
cd mendeley-rMsync
python3 sync.py

One-time Setup

Okay it's not strictly one-time, you may need to refresh credentials once every few months. Here are the steps:

  1. Install Python 3.*

  2. And Pip3

    python3 -m ensurepip --upgrade
    
  3. Install Python libraries that help the tool talk to the Mendeley Cloud.

    pip3 install mendeley python-dotenv 
    (run with --user flag if permission denied)
    
  4. Here's the complicated part: To talk to Mendeley, you also need to authorize the tool with a Mendeley access token. Here's how to get it:

    a. Register an application with Mendeley, instructions here. This is what I see after registration: image

    b. Now you should have the id (MENDELEY_CLIENT_ID), secret (MENDELEY_CLIENT_SECRET) and redirect URI (MENDELEY_REDIRECT_URI). We need one more value: the token (MENDELEY_OAUTH2_TOKEN_BASE64). There's a complicated workflow here but I found it simpler to use the mendeley-cli tool to get the token. You can find how to install the tool and get the token in the tool's README, but here's a quick preview:

    pip3 install mendeley-cli --user
    MENDELEY_CLIENT_ID=<...> MENDELEY_CLIENT_SECRET=<...> MENDELEY_REDIRECT_URI=<...> mendeley get token
    

    c. Save all these in a file named .mendeley_config in the same folder as sync.py.

    MENDELEY_CLIENT_ID=<...>
    MENDELEY_REDIRECT_URI=<...>
    MENDELEY_CLIENT_SECRET=<...>
    MENDELEY_OAUTH2_TOKEN_BASE64=<...>
    
  5. Okay, almost there. Now we need to authorize the tool to talk to Remarkable Cloud. We'll use the rmapi tool: just download it, place the executable in our folder and run it once to setup and add your current device.

    ./rmapi
    

    (On MacOS, you may need to bypass security for this tool as it is apparently unverified)

  6. That's it! Now just run the script and watch as it syncs your files one by one.

    python3 sync.py
    

    You may need to refresh your local Mendeley client to see the annotations from Remarkable.

mendeley-rmsync's People

Contributors

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