Skip to main content

Zotero-meta-update

CI tests Coverage Status PyPI pyversions

Though Zotero is a great tool for managing references, the metadata of your library items can be wrong for different reasons:

  1. You got the PDF file before it is formally published (e.g., from the authors' personal site or Arxiv), and the metadata is not updated yet.
  2. I found Zotero often cannot retrieve the correct metadata for some papers, especially for those published in conference proceedings.
  • This script automatically downloads all your items with Zotero HTTP API, matches each item on databases including CrossRef, DBLP, corrects the fields of the item metadata, and finally writes back the item metadata to server.
  • An item can be locked by add keyword 'lock' to the 'extra' field

Examples

example1 example1

Usage

  1. pip install Zotero-meta-update
  2. export ZOTERO_USER_ID={your Zotero user ID} (get it from https://www.zotero.org/settings/keys) or save it in a file named ZOTERO_USER_ID in the working directory.
  3. export ZOTERO_API_KEY={your Zotero API key} (get it from https://www.zotero.org/settings/keys) or save it in a file named ZOTERO_API_KEY in the working directory.
  4. update_zotero_meta --help  # show helps
    update_zotero_meta # run without writting to server
    update_zotero_meta -w  # run with manual update confimration for each changed item
    update_zotero_meta -w --skip-confirmation # changed items are automatically written back to server
    

Development

Run Tests

 PYTHONPATH=$(realpath .) pytest --cov=. -n 16 ./tests
 coveralls

Build and Upload to PyPi

python setup.py sdist bdist_wheel 
python3 -m twine upload dist/* --skip-exist --verbose

Roadmap

  • Search items with title, DOI, and author names from the original item metadata on databases (including CrossRef, DBLP, etc.) and update the metadata of the item.
    • Supported databases:
      • CrossRef
      • DBLP
    • Supported item types:
      • Conference paper
      • Journal articles
      • Arxiv papers (informal publications) (They are quite common for me).
      • Book/Book chapters
  • Manually select the correct item from the search results when there are multiple matches (currently I raise an exception in such cases). I think it should be better to develop a GUI plugin of Zotero, in which users can manually select the correct match of an item.
  • There could be errors in the databases, e.g., https://api.crossref.org/works/10.1145/2465529.2465753 (conference name)
  • Allow to lock an item (e.g., in case it is manually maintained)
  • Sometimes, the title field is not correctly filled. For example, a subtitle is missing.
  • Thesis and dissertation

Metadata

Release files for Zotero-meta-update 0.1.1

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

Built distribution (wheel)

Table of built distributions (wheels) for Zotero-meta-update 0.1.1
File Interpreter ABI Platform
Zotero_meta_update-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / Zotero_meta_update-0.1.1-py3-none-any.whl

Download URL Zotero_meta_update-0.1.1-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1a11b9e47e9ac22869381c7c6b3b5e9feed7b2f3f6df32570ec6a1f43d89936
BLAKE2b-256 checksum
How to use checksums
6828375ed4f5df300b787e9bda9f9ce6557c2e5212bc219d5a0f13a18986dc6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

2 release files

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