Giter Site home page Giter Site logo

zrmconnector's Introduction

This project is no longer supported by me.

DISCONTINUED- ZRMconnector -DISCONTINUED

Zotero / ReMarkable connector

Principles

The ZRMconnector is used to connect Zotero and Remarkable tag data. As a lot of science reader use Zotero tags to remember about metadata (article read, left to read, currently reading, etc.), this "background" server system assists the reader in displaying those articles in specific folders according to their tags.

example

A PhD student wanting to easly access its reading papers on its ReMarkable can use the ZRMconnector this way:

  • tag your article with relevant tag names (e.g. toread, reading, done)
  • create a Connector in which

Demo video

Install

Install using

git clone [email protected]:hugodecasta/ZRMconnector.git

Get into the repository and setup the npm packages

cd ZRMconnector
npm i

Setup

Setting up the ZRMc server is quite simple and quick:

  • setup connectors
  • launch the server
  • provide asked credential
  • leave it alone ...

Connectors

A connectors.json file is required in order for the ZRMc server to deliver its service.

Create the connectors.json file at the root of the repository.

Inside this file, one need to add each connector as a property as follows:

{
    "connector_1": {},
    "phd_connector": {},
    "my_company_conn": {}
}

(for the {} objects, see the connector syntax below)

Connector

Here is the required connector syntax

{
    "remarkable_dir": "/RM_Directory/to/the/articles",
    "remarkable_archive_dir": "trash or whatever sub dir of 'remarkable_dir'",
    "zotero_path": [
        {
            "type": "group",
            "name": "My_Company_group_name"
        },
    ],
    "tags": {
        "me - toread": "to read",
        "me - reading": "reading",
        "me - done": "done"
    }
}

the remarkable_dir property indicates the main ReMarkable directory in which the connector whill store and look for content. This directory MUST be existing when the server is initiated

the remarkable_archive_dir property indicated the relative to remarkable_dir directory in which to archive the "deleted" or un-taged articles (the value trash indicates to delete those articles)

the zotero_path property indicates the main library monitored by the system:

  • { type: "group", name: "my_group" } indicates a group
  • { type: "collection", name: "phd" } indicates a user collection

the tags property indicated the tags and directory names associated respectivly with the Zotero account and the ReMarkable account. In this example, each article tagged me - toread will end up in the /RM_Directory/to/the/articles/to read folder in the ReMarkable

Launch

Launch the ZRMc server using

node .

Credentials

Once stated, the ZRMc server will ask for the following credentials (maybe not in this order):

  • ReMarkable One Time Code : found in the My-ReMarkable panel (click on "Connect new desktop" to generate the code)
  • Zotero API key : found in the Feeds/API zotero panel (click "Create new private key" to create your API key)
  • Zotero user_id : found in the Feeds/API "Your userID for use in API calls is: XXXXXXX"

Usage

The ZRMc server will download all tag-related article into the ReMarkable according to the connector settings.

Never put files in the tagged directories (might fail the ZRMc server)

You can change the tags (will move the related ReMarkable articles automatically)

You can move the articles from tagged-directory to tagged-directory in the ReMarkable (will retag or untag the related articles in Zotero automatically)

Limitations

The ReMarkable cloud sync systems is not stable at this moment. Consequently, every change in the cloud initiated by the system will take effect on the ReMarkable tablet only if the tablet is opened and in realtime syncing mode. All changes applyed in the cloud while the tablet is sleeping or offline will not be synced once the tablet is awake again thus creating data inconsistency between the tablet and the cloud.

zrmconnector's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

zrmconnector's Issues

error after providing one-time-code

using the following config

{
    "zotero_1": {
        "remarkable_dir": "/zot",
        "remarkable_archive_dir": "bin'",
        "zotero_path": [
            {
                "type": "collection",
                "name": "RM"
            }
        ],
        "tags": {
            "me - toread": "2READ",
            "me - reading": "READING",
            "me - done": "READ"
        }
    }
}

resulted in the following error after providing a new one-time-code

❯ node .
[SYSTEM]::launch of ZRMc system v0.4.2
[CONN:zotero_1]::setup local_directories /zot
CREDENTIAL NEEDED - ReMarkable One Time Code: ixslwrza
ReMarkable credentials Error

/Users/faro/repositories/ZRMconnector/node_modules/node-fetch/lib/index.js:1461
                        reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
                               ^
FetchError: request to https://doesnotexist.remarkable.com/ failed, reason: getaddrinfo ENOTFOUND doesnotexist.remarkable.com
    at ClientRequest.<anonymous> (/Users/faro/repositories/ZRMconnector/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (node:events:365:28)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:365:28)
    at emitErrorNT (node:internal/streams/destroy:193:8)
    at emitErrorCloseNT (node:internal/streams/destroy:158:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND'
}

any idea?

Isue when entering credentials

Hi,

I get this error message just after entering my one-time remarkable code. Any idea why?

Thanks in advance,

ReMarkable credentials Error
/Users/amaurygouverneur/MyDocuments/KTH/Research/zotero_remarkable_connector/ZRMconnector/node_modules/node-fetch/lib/index.js:683
throw new TypeError(${value} is not a legal HTTP header value);
^

TypeError: Bearer <!doctype html><title>reMarkable</title><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':

SyntaxError: Unexpected token ?

I ran "node ." and got the following error:

`ZRMconnector/connector.js:102
let paper = papers[title] ?? { title }
^

SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/aos11409/ZRMconnector/index.js:4:19)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)`

I'm unsure if this is my fault in setting up the connectors.json or if this is a error in the main code. Any ideas?

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.