nicolasshu / zotero2papis

4 stars 1 forks source link

What I particularly wanted was a tool which allowed one to parse the information from Zotero to papis in a way that it would keep some sort of human-readable file structure, and keep the attachments used on Zotero. How I then decided to design this is to make this a one-way workflow which looks through the SQLite file from Zotero, and copies them over to the papis directory.

First clone the repository and go into the repository.

+begin_src bash

git clone https://github.com/nicolasshu/zotero2papis

+end_src

To set it up, you may either use as an editable package:

+begin_src bash

pip install -e .

+end_src

Or as a binary package on your environment:

+begin_src bash

python3 setup.py install

or

pip install .

+end_src

To use it, simply run

+begin_src bash

zotero2papis -z {location_of_zotero} -o {output_location}

+end_src

where the =-z= / =--zotdir= will be the parent directory of where your Zotero database is located (e.g. =~/Zotero= or =~/sync/zotero=) and =-o= / =--outdir= will be the output directory. If the output directory does not exist, then the program will make the appropriate directories for you.

This will then start copying the files to the output directory. It will be first looking through the database to see where the files or linked files are originally located.

At this point, you can start to use papis on the output directory or to copy the contents to your desired papis library. In case you do not see any updates on your papis despite you having changed the directory or moved the files, clear the cache by running the following as suggested in the [[https://papis.readthedocs.io/en/latest/faq.html][FAQ]].

+begin_src bash

papis --clear-cache

+end_src