Skip to main content

Zoterosync

Syncs local zotero files to a remote storage using rclone. This is a work in progress.

Software requirements

  • python 3
  • pip
  • rclone
  • virtualenv: virtual environment is apropriated to install compatible dependencies
  • bash

Recomended software

  • Linux Distro: not tested on other platforms
  • Google Drive: rclone is compatible with a lot of cloud storage, but we've tested only with 'drive' option.

Install zoterosync

  • Download the latest version with git:
git clone https://gitlab.com/marceloakira/zoterosync
  • Create a virtual environment with python3 as default interpreter:
virtualenv --python=python3 zoterosync
  • Install required python libraries inside virtual environment:
cd zoterosync
source bin/activate
pip install -r requirements.txt
  • Create configuration:
# generates default configuration
python zoterosync_cli.py config
  • Setup script:
# create a directory for executable scripts
mkdir -P ~/bin
# add this path to PATH environment variable
echo "~/bin" >> ~/.profile
# setup script
ln -s $PWD/zoterosync.bash ~/bin/zoterosync
# close the current terminal and test command
zoterosync

Configure a remote storage

$ rclone config
Current remotes:

Name                 Type
====                 ====

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n
name> Quantum Computing
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
...
13 / Google Drive
   \ "drive"
...
Storage>13 
* See help for drive backend at: https://rclone.org/drive/ **

Google Application Client Id
Setting your own is recommended.
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
If you leave this blank, it will use an internal key which is low performance.
Enter a string value. Press Enter for the default ("").
client_id>      <--- press Enter
OAuth Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret>     <--- press Enter
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"
...
scope> 1 
ID of the root folder
Leave blank normally.

Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.

Enter a string value. Press Enter for the default ("").
root_folder_id>       <--- press Enter
Service Account Credentials JSON file path 
Leave blank normally.
Needed only if you want use SA instead of interactive login.

Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.

Enter a string value. Press Enter for the default ("").
service_account_file>  <--- Press Enter
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n>      <-- press Enter
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n>     <-- press Enter
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=WOqyzeguK5dtqpDkDnplOQ
Log in and authorize rclone for access
Waiting for code...      <-- configuration with browser
Log in and authorize rclone for access
Waiting for code...
Got code
Configure this as a team drive?
y) Yes
n) No (default)
y/n> y
Fetching team drive list...
Choose a number from below, or type in your own value
...
  3 / Quantum Computing
   \ "0ABtgQWBCM1GiUk9PVA"
...
[Quantum Computing]
type = drive
scope = drive
token = {xxx}
team_drive = 0AIZzmLgyr5CaUk9PVA
root_folder_id = 
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

List your groups and set a remote

$ zoterosync listremotes
quantum-computing
$ zoterosync listgroups
Quantum Computing
$ zoterosync setremote 'Quantum Computing' 'quantum-computing'
creating remote path quantum-computing:zotero-storage
remote path created

List your groups in local storage and push

$ zoterosync push 'Quantum Computing'
...
2020/12/25 11:50:43 INFO  : 
Transferred:       19.321M / 19.321 MBytes, 100%, 282.299 kBytes/s, ETA 0s
Transferred:           34 / 34, 100%
Elapsed time:      1m12.2s

List your remotes and pull

$ zoterosync listremotes
Quantum Computing
$ zoterosync pull 'Quantum Computing'
pulling changed files from remote to local storage
2020/12/25 11:53:53 INFO  : There was nothing to transfer
2020/12/25 11:53:53 INFO  : 
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:                34 / 34, 100%
Elapsed time:         3.5s
...

That's it, enjoy zoterosync!

Metadata

Release files for zoterosync 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zoterosync 0.1.3
File Size Uploaded Provenance Actions
zoterosync-0.1.3.tar.gz 7.2 kB Without provenance Details for zoterosync-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zoterosync 0.1.3
File Interpreter ABI Platform Actions
zoterosync-0.1.3-py3-none-any.whl Python 3 none any Details for zoterosync-0.1.3-py3-none-any.whl

Total release size: 14.9 kB

Release files / zoterosync-0.1.3.tar.gz

Download URL zoterosync-0.1.3.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1313f127e5ec30bc76811ec17cd1b4e49e780d7f82bb24970a8448e18b909d96
BLAKE2b-256 checksum
How to use checksums
a8219d08d3ae8d98ff69b776afa000f24d72ffe3ea220c44718d53227b118450
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / zoterosync-0.1.3-py3-none-any.whl

Download URL zoterosync-0.1.3-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8f63461c2aee0d048e4ff27b31974c289085b4c52e9c2e5a9f49b7ed9c194f4
BLAKE2b-256 checksum
How to use checksums
0a50467f1a825422b0670ca486c7b9a0374ffb471894b37625519cb7c078c700
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Security for zoterosync 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page