Skip to content

BacilleX/Zotero-Library-PDF-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Zotero Library PDF Exporter

This Python script exports all PDF files from a specified Zotero collection β€” including its subcollections β€” by querying the Zotero SQLite database and locating the corresponding files in the local storage/ directory. The script then copies those files into an organized folder structure for easier backup, migration, or offline access.


πŸ“œ Based on Original Work

This project is based on a script originally written by Jaime Ruiz Serra, found on the zotero forum: πŸ”—https://forums.zotero.org/discussion/118230/wild-idea-notebooklm-like-search-in-zotero

and published as a GitHub Gist:
πŸ”— https://gist.github.com/RuizSerra/6a657f6f0b2ce1e5d14a74a29fa68b8d

The original script retrieved files from a Zotero collection and copied them to a destination folder.


✨ Modifications & Contributions

This version was generated and extended using OpenAI's ChatGPT (GPT4o), with my guidance and intent. I used ChatGPT to:

  • Add support for nested collections (subfolders)
  • Automate folder naming to avoid overwrites
  • Improve file discovery logic using glob
  • Enhance command-line usability with better defaults and documentation

These modifications were implemented through iterative prompts, testing, and manual adjustments.


πŸš€ Usage

Requirements

  • Python 3.x
  • Local access to your Zotero directory (must include zotero.sqlite and storage/)

Run the script

  • Don't forget to close Zotero before running the command
python3 zotero_exporter.py --zotero-base-path "/Users/you/Zotero" --destination-dir "directoryname"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages