Skip to content

gnzng/zotero_automate

Repository files navigation

Zotero Automation

A Python tool for analyzing Zotero library tags using AI categorization and visualization. Use at your own risk.

Features

  • 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

Installation

  1. Clone the repository:
git clone https://github.com/gnzng/zotero_automate.git
cd zotero_automate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env-example .env
# Edit .env with your actual values

you need the the following variables:

  • ZOTERO_DB_PATH: Path to your Zotero SQLite database
  • CBORG_API_KEY: Your OpenAI API key
  • CBORG_BASE_URL: OpenAI API base URL
  • CBORG_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.

Usage

Make sure zotero is closed, since we need database access. Run the main analysis:

python main.py

You should be able to uncomment or comment the things you would like to run your analysis on.

Output Files

  • unique_tags.txt: List of unique tags from your library
  • categorized_tags.md: AI-categorized tags in markdown format, that works great to include in obsidian
  • Word cloud visualization

wordcloud

  • Interactive network visualizer from tags and categories

network

  • Tag categories as an interactive radar plot

radar

Contributing

Please feel free to open a PR or issue, I am looking forward to feedback.

About

Automatic analysis of zotero tags using LLM AI and RAG

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages