Import Zotero annotations with Dendron integration
Project description
Zendron
Version: 1.1.2
Introduction
- This package was developed for porting Zotero annotations and metadata to markdown. These markdown notes are then brought into a Dendron hierarchy for integration with vault notes. We recommend using the package within Visual Studio Code.The end goal is to get a two way sync between notes in Zotero and notes in Dendron, but this has some difficulties and limitations that are taking some time to address. For now only a one way sync from Zotero to Dendron is supported.
Install Instructions
- It is recommended to build a conda env for installation.
- Install Dendron CLI.
npm install -g @dendronhq/dendron-cli@latest
- Install the zendron
python -m pip install zendron
Zotero API key
- Zotero API key
- We recommend setting up you Zotero API key with the following settings to allow for full functionality. This key can then be copy pasted in the configuration file. You should add your key to
.gitignore
to prevent others from accessing your Zotoero database. If the key is lost you can always generate a new one.
Zotero and File Import Configuration
All zendron configuration is handled in config.yml.
library_id : 4932032 # Zotero library ID
library_type : group # [user, group] library
api_key : FoCauOvWMlNdYmpYuY5JplTw # Zotero API key
collection: null # Name of Zotero Collection, null for entire library
item_types: [journalArticle, book, preprint, conferencePaper, report] # List of item types according to [pyzotero](https://pyzotero.readthedocs.io/en/latest/)
local_image_path: /Users/<username>/Zotero/cache # Local path for importing annotated images
dendron_limb: zendron.import # Dendron import limb e.g. zendron.import.paper-title.annotations.md
zotero_comment_title: zendron comment # fixed for now... needed for eventual 2-way sync.
pod_path: zotero_pod # Name of dendron pod, removed after completion of import. We will later add configuration for this to remain. This will allow for non Dendron users to import markdown Zotero notes in a strucutred hierarchy.
Basic Usage
There are only two basic commands that work as of now.
zendron
- This command should only be run in the root directory of the workspace.
- This command imports notes according to a defined config.yml. Once the command is run the first time the user needs to modify their configuration
./conf/config.yaml
according the Zotero library specifications and the Zotero API. - Notes are imported with a
## Time Created
heading. This allows for stable reference from other notes, within the note vault. We autogenerate a*.comments.md
that should be used for taking any additional notes within Dendron. Additional notes taken within the meta data file (notes/zendron.import.<paper-title>.md
), or the*.annotations.md
will be overwritten after runningzendron
for a second time.
zendron remove=true
- This command removes all imported notes and associated links. We run a
createMissingLinkedNotes
following the deletion of Dendron notes to repopulatetags
andusers
that will be removed on runningzendron-remove
. - There are more complicated removal's that could be desired so we plan to eventually change this from a
bool
to anstr
.
- This command removes all imported notes and associated links. We run a
Miscellaneous
- The
zendron_cache
is not currenlty in use. We do an entire relaod each time, so for large libraries performance will be poor.- You an feel free to delete the cache as you please.
- If there are run that fail, sometimes a
.hydra
with the given configuraiton will be generated in the root dir. This isn't an issue but it contains the API information and should therefore be added to the.gitignore
as a safeguard. In addition these files can be used to inspect the reason for the faiure. __main__.log
is generated after running azendron
, this can also be deleted as you please. It is also useful for inspecting an failures to import.
Troubleshooting
- If you are having trouble with startup you can use this Zendron-Test template and try to reproduce your issues here. Simply click on
Use this template
, clone the repo and try to runzendron
here. This will allow for us to catch things we overlooked for different user workspace configuration etc. Once you have tried to reproduce issues here please submit an issue on Zendron.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zendron-1.1.2.tar.gz
(118.7 kB
view details)
Built Distribution
zendron-1.1.2-py3-none-any.whl
(28.8 kB
view details)
File details
Details for the file zendron-1.1.2.tar.gz
.
File metadata
- Download URL: zendron-1.1.2.tar.gz
- Upload date:
- Size: 118.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 110036c4459a950a767549a04cfe388e1d6a0c5300886822e5987b393274e911 |
|
MD5 | 1ee4166dce5fdbac7135463cd746deb8 |
|
BLAKE2b-256 | b4bf73f153c715d886a1ae7931af53e17b6c23f2b34cdef9fed396e2c98a9037 |
File details
Details for the file zendron-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: zendron-1.1.2-py3-none-any.whl
- Upload date:
- Size: 28.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 019b79125bf1ee5481d6e9d8e897fe607649290dffa221d86cf896c343db3e06 |
|
MD5 | 1b84fa13b780a8a1a42928c67b026f04 |
|
BLAKE2b-256 | 6d476c077e3a835a2ed8268617b48593c68c2c2e2b67fb391b7345d0395dc3c2 |