A Python tool for analyzing Zotero library tags using AI categorization and visualization. Use at your own risk.
- Extract and analyze tags from Zotero SQLite database
- AI-powered tag categorization using OpenAI API
- Generate word clouds from tags
- Export categorized tags in Obsidian markdown format
- Save unique tags for further analysis
- Clone the repository:
git clone https://github.com/gnzng/zotero_automate.git
cd zotero_automate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env-example .env
# Edit .env with your actual valuesyou need the the following variables:
ZOTERO_DB_PATH: Path to your Zotero SQLite databaseCBORG_API_KEY: Your OpenAI API keyCBORG_BASE_URL: OpenAI API base URLCBORG_MODEL: OpenAI model name to use
You can probably use other providers, like in my case https://cborg.lbl.gov/ api URL, which uses the openai module for communication.
Make sure zotero is closed, since we need database access. Run the main analysis:
python main.pyYou should be able to uncomment or comment the things you would like to run your analysis on.
unique_tags.txt: List of unique tags from your librarycategorized_tags.md: AI-categorized tags in markdown format, that works great to include in obsidian- Word cloud visualization
- Interactive network visualizer from tags and categories
- Tag categories as an interactive radar plot
Please feel free to open a PR or issue, I am looking forward to feedback.


