Giter Site home page Giter Site logo

zotero-remarkable's Introduction

Zotero reMarkable sync

This uses the reverse engineered ReMarkable API library to automatically transfer files from a Zotero collection to a reMarkable folder. When files have been uploaded, they are then removed from the Zotero collection. Run this script periodically to continually transfer uploaded files.

Currently, the environment variables in the table below must be defined. You can use a .env file or define them any other way you choose.

Name Description
ZOTERO_USER Zotero user ID
ZOTERO_API_KEY Zotero API key
ZOTERO_COLLECTION Collection key to use in Zotero
WEBDAV_URL URL of the WebDAV server hosting your Zotero files
WEBDAV_AUTH username:password for WebDAV authentication
REMARKABLE_TOKEN reMarkable API token
REMARKABLE_FOLDER reMarkable destination folder (default /Zotero)

Zotero user ID and API key can be found on the settings page. The Zotero collection key can be found as the last component in the URL path when browsing on the Web interface. For example in the URL below, the collection key is ABCDEFG.

https://www.zotero.org/michaelmior/items/collectionKey/ABCDEFG

The reMarkable API token is generated by ReMarkable API. You will need a one-time code generated from reMarkable. With the code, run remarkable.php register YOUR_CODE_HERE. This will generate a file auth.token which contains the key.

zotero-remarkable's People

Contributors

michaelmior avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zotero-remarkable's Issues

WebDAV setup

I'm getting this awful error message when fetching items from Zotero:

Fetching items from Zotero...
3 items found.
Processing item HDHYRZAB
  Downloading zip...
PHP Fatal error:  Uncaught ErrorException: Undefined offset: 1 in /home/alberto/personal/remarkable/zotero-remarkable/vendor/guzzlehttp/guzzle/src/Client.php on line 354 in /home/alberto/personal/remarkable/zotero-remarkable/zotero-remarkable.php:11
Stack trace:
#0 /home/alberto/personal/remarkable/zotero-remarkable/vendor/guzzlehttp/guzzle/src/Client.php(354): errHandle(8, 'Undefined offse...', '/home/alberto/p...', 354, Array)
#1 /home/alberto/personal/remarkable/zotero-remarkable/vendor/guzzlehttp/guzzle/src/Client.php(273): GuzzleHttp\Client->applyOptions(Object(GuzzleHttp\Psr7\Request), Array)
#2 /home/alberto/personal/remarkable/zotero-remarkable/vendor/guzzlehttp/guzzle/src/Client.php(125): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#3 /home/alberto/personal/remarkable/zotero-remarkable/vendor/guzzlehttp/guzzle/src/Client.php(131): GuzzleHttp\Client->requestAsync('get', Object(GuzzleHttp\Psr7\Uri), Array)
#4 /home/alberto/personal/remarkable/zotero-remarkable/vendor/guzzlehttp/guzzle/src/Client. in /home/alberto/personal/remarkable/zotero-remarkable/zotero-remarkable.php on line 11

Any ideas why is it happening?

Unable to run

# jaan @ host in ~/projects/zotero-remarkable on git:master x [15:11:54]
$ ./zotero-remarkable.php
./zotero-remarkable.php: line 1: ?php: No such file or directory
./zotero-remarkable.php: line 3: require_once: command not found
./zotero-remarkable.php: line 5: //: is a directory
./zotero-remarkable.php: line 6: //: is a directory
./zotero-remarkable.php: line 7: syntax error near unexpected token `$errNo,'
./zotero-remarkable.php: line 7: `function errHandle($errNo, $errStr, $errFile, $errLine) {'

Any ideas?

Use Zotero's Own Storage?

Hi Michael,

Thanks for this tool, I'm looking forward to getting it working. I have a few starter questions, which also might be useful for others in the future.

  1. Just to make sure I've not missed anything. To install I did composer install, chmod +x zotero-remarkable.php and then to run ./zotero-remarkable.php. Is that correct?
  1. Should the remarkable token include the '%' at the end?
  2. At the moment my Zotero catalogue is small enough to use their default free storage, is there a way to get your codes working with that?

Thanks for your time,
Chas

Add License file

A license file should be added to make it clear that this code is under the MIT license. Right now it's not clear unless you inspect composer.json file.

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.