{"id":13771090,"url":"https://github.com/anilkyelam/mendeley-rMsync","last_synced_at":"2025-05-11T03:33:01.862Z","repository":{"id":77742677,"uuid":"327553689","full_name":"anilkyelam/mendeley-rMsync","owner":"anilkyelam","description":"Script to sync papers from Mendeley to reMarkable tablet","archived":false,"fork":false,"pushed_at":"2021-09-22T00:13:33.000Z","size":23,"stargazers_count":21,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-17T06:40:34.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anilkyelam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-01-07T08:46:58.000Z","updated_at":"2024-08-20T17:56:38.000Z","dependencies_parsed_at":"2023-02-28T21:02:01.689Z","dependency_job_id":null,"html_url":"https://github.com/anilkyelam/mendeley-rMsync","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilkyelam%2Fmendeley-rMsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilkyelam%2Fmendeley-rMsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilkyelam%2Fmendeley-rMsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anilkyelam%2Fmendeley-rMsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anilkyelam","download_url":"https://codeload.github.com/anilkyelam/mendeley-rMsync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514352,"owners_count":21920327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:00:47.533Z","updated_at":"2025-05-11T03:33:01.574Z","avatar_url":"https://github.com/anilkyelam.png","language":"Python","funding_links":[],"categories":["Cloud Tools"],"sub_categories":["Launchers"],"readme":"# Remarkable Support for Mendeley\nThis tool syncs PDFs from a folder in [Mendeley Reference Manager](https://www.mendeley.com/download-reference-manager/) with a folder in [Remarkable Cloud](https://my.remarkable.com) (which ultimately ends up in your tablet if it is connected). \n\n## What does it do, exactly?\nIt 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!\n\nNote 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.\n\n\n## How to run\nThe sync is not automatic right now, you need to run this script (after the One-time Setup below) everytime you want to synchronize:\n```\ngit clone https://github.com/anilkyelam/mendeley-rMsync\ncd mendeley-rMsync\npython3 sync.py\n```\n\n\n## One-time Setup\nOkay it's not strictly one-time, you may need to refresh credentials once every few months. Here are the steps:\n\n1. Install [Python 3.*](https://www.python.org/downloads/)\n2. And [Pip3](https://pip.pypa.io/en/stable/installation/)\n    ```\n    python3 -m ensurepip --upgrade\n    ```\n3. Install Python libraries that help the tool talk to the Mendeley Cloud.\n    ```\n    pip3 install mendeley python-dotenv \n    (run with --user flag if permission denied)\n    ```\n4. 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: \n\n      a. Register an application with Mendeley, instructions [here](https://dev.mendeley.com/reference/topics/application_registration.html).\n        This is what I see after registration: ![image](https://user-images.githubusercontent.com/19861675/134260395-9406b5d6-9ec0-454c-8fd7-13050375652a.png)\n        \n      b. Now you should have the id (MENDELEY_CLIENT_ID), secret (MENDELEY_CLIENT_SECRET) and redirect URI (MENDELEY_REDIRECT_URI). \n      We need one more value: the token (MENDELEY_OAUTH2_TOKEN_BASE64). There's a complicated workflow [here](https://dev.mendeley.com/reference/topics/authorization_auth_code.html) but I found it simpler to use the [mendeley-cli](https://github.com/shuichiro-makigaki/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:\n      ```\n      pip3 install mendeley-cli --user\n      MENDELEY_CLIENT_ID=\u003c...\u003e MENDELEY_CLIENT_SECRET=\u003c...\u003e MENDELEY_REDIRECT_URI=\u003c...\u003e mendeley get token\n      ```\n      \n      c. Save all these in a file named `.mendeley_config` in the same folder as `sync.py`.\n      ```\n      MENDELEY_CLIENT_ID=\u003c...\u003e\n      MENDELEY_REDIRECT_URI=\u003c...\u003e\n      MENDELEY_CLIENT_SECRET=\u003c...\u003e\n      MENDELEY_OAUTH2_TOKEN_BASE64=\u003c...\u003e\n      ```\n\n5. Okay, almost there. Now we need to authorize the tool to talk to Remarkable Cloud. We'll use the [rmapi](https://github.com/juruen/rmapi/releases) tool: just download it, place the executable in our folder and run it once to setup and add your current device. \n    ```\n    ./rmapi\n    ```\n   (On MacOS, you may need to [bypass security](https://support.apple.com/en-us/HT202491) for this tool as it is apparently unverified)\n\n6. That's it! Now just run the script and watch as it syncs your files one by one.\n    ```\n    python3 sync.py\n    ```\n    You may need to refresh your local Mendeley client to see the annotations from Remarkable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanilkyelam%2Fmendeley-rMsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanilkyelam%2Fmendeley-rMsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanilkyelam%2Fmendeley-rMsync/lists"}