@idlhy0218: Academic papers are basically a citation "conversation." I built a tool that pulls folders from your Zotero library and…
Summary
A free open-source tool that analyzes citation relationships from Zotero libraries using the OpenAlex database and generates linked Obsidian notes.
View Cached Full Text
Cached at: 07/04/26, 02:48 PM
📄Academic papers are basically a citation “conversation.”
I built a tool that pulls folders from your Zotero library and maps citation relationships between your saved papers.
Just needs your Zotero ID + API key. No LLM tokens, fully FREE.
https://t.co/2KIzN4P38a https://t.co/Vn88EelUHz
idlhy0218/Citation-Network
Source: https://github.com/idlhy0218/Citation-Network
Citation Network Builder
This tool analyzes citation relationships between papers stored in Zotero using the free OpenAlex academic database API, and automatically converts them into linked Obsidian notes.
Workflow
- Zotero: Retrieves paper metadata and collection (folder) structures from your Zotero library.
- OpenAlex: Queries the OpenAlex database using paper DOIs to determine citation relationships within the selected collections.
- Obsidian: Generates or updates individual paper notes in your vault, complete with wiki-links. You can visualize the citation network using Obsidian’s built-in Graph View.
Prerequisites
- Python 3.9 or higher (https://python.org)
During Python installation, make sure to check the box “Add python.exe to PATH” at the bottom. If you skip this, your terminal will fail to recognize the
pythoncommand. -
- Zotero account and API Key
- Obsidian (https://obsidian.md)
Installation
Step 0 - Fork & Clone the Repository
- Click the Fork button at the top-right of this GitHub repository page to copy it to your own GitHub account.
- Clone the repository to your local computer:
- Using Git command:
git clone https://github.com/idlhy0218/Citation-Network.git - Or open it using GitHub Desktop.
- Using Git command:
Step 1 - Open Terminal & Install Dependencies
Open Command Prompt or PowerShell, navigate to this project folder, and install the dependencies.
Easy way to open terminal at the current folder (Windows):
- Open File Explorer and navigate to this project folder (
Citation Network).- Click the address bar at the top, clear the text, type
cmd, and press Enter.- A Command Prompt window will open directly in this directory.
Once the terminal is open, run:
python -m pip install -r requirements.txt
Step 2 - Create Config File and Set API Keys
When you first clone this repository, you only have the template config file. You need to create a .env file and insert your credentials.
-
In the terminal, run the following command to duplicate
.env.exampleas a new.envfile:- Command Prompt (cmd):
copy .env.example .env - PowerShell:
cp .env.example .env
(Or copy
.env.examplein File Explorer and rename it to.env. Make sure it is not named.env.txt) - Command Prompt (cmd):
-
Open the newly created
.envfile with a text editor (like Notepad) and fill in your details:- ZOTERO_USER_ID: Go to Zotero API Settings. At the top, copy the number next to “Your userID for API calls is XXXXXX”.
- ZOTERO_API_KEY: On the same page, click “Create new private key” to generate an API key.
- OBSIDIAN_VAULT_PATH: The absolute path to your Obsidian Vault folder (e.g.
C:\Users\YourName\Documents\MyVault).
# [Required] Zotero API credentials & Obsidian path
ZOTERO_USER_ID=Your Zotero User ID (digits)
ZOTERO_API_KEY=Your Zotero API Key
OBSIDIAN_VAULT_PATH=C:\Users\YourUsername\Path\To\Obsidian\Vault
# [Optional] Personalize folder name & increase request speed
CITATION_NETWORK_FOLDER=Citation Network
[email protected]
- Personalizing Your Configuration (Optional):
- Change Output Folder Name: If you want the notes to be saved in a folder other than the default
Citation Network, modifyCITATION_NETWORK_FOLDERto your preferred folder name (e.g.,My Citations). - Improve OpenAlex API Speed: If you have a large library (dozens of papers or more), add your email address in
OPENALEX_EMAIL. OpenAlex offers a faster rate limit (“Polite Pool”) for users who identify themselves via email.
- Change Output Folder Name: If you want the notes to be saved in a folder other than the default
Step 3 - Test the Connection
To verify if everything is set up correctly, run:
python main.py --test
If you see "Zotero connection successful" and "OpenAlex connection successful", you are ready to go.
How to Use
Run Interactively (Recommended)
Double-click run.bat or run the following command in your terminal:
python main.py
The program will display your Zotero folders in a tree structure:
============================================================
Select a Zotero folder
(Tree) = Has subfolders / (Single) = No subfolders
============================================================
1. (Single) Introduction
2. (Tree) Machine Learning
3. (Single) Supervised Learning
4. (Single) Unsupervised Learning
...
Enter the number of the folder you want to process. Selecting a parent folder will automatically process all its subfolders.
Run with a Specific Folder Name
python main.py --collection "Machine Learning"
Wrap the collection name in quotation marks. Subfolders will be automatically included.
Test Connection
python main.py --test
File Structure and Roles
Citation Network/
│
├── run.bat Execution file. Double-click to start quickly.
│
├── main.py Entry point of the program. Handles folder selection.
│
├── .env Configuration file for API keys and paths.
│ Never share this file or upload it to GitHub.
│
├── requirements.txt List of required Python libraries.
│ Only needs to be run once during installation.
│
├── cache/
│ └── openalex_cache.json Cache file for OpenAlex query results.
│ Makes subsequent runs significantly faster.
│
└── src/
├── zotero_client.py Retrieves paper lists and metadata from Zotero.
├── openalex_client.py Fetches citation connections using OpenAlex.
└── obsidian_writer.py Writes paper data as markdown files to Obsidian.
Viewing the Output
Notes are generated under the folder specified by CITATION_NETWORK_FOLDER in your .env file (defaults to Citation Network) inside your Obsidian Vault.
Inside each collection folder, you will find:
citekey.md: Individual paper notes containing references to other papers._Index.md: A summary table of all papers in that folder.
Open Graph View in Obsidian to see the network. You can filter the graph by entering path:"Your Folder Name" (e.g. path:"Citation Network") in the graph filter bar to show only these citation notes.
Good to Know
- Papers must have a DOI to fetch citation data. Adding DOIs in Zotero yields more connections.
- OpenAlex is a free scholastic database and does not require registration or API keys.
- Re-running the script on the same folder will update the notes. Custom comments or notes added by you will be preserved as long as you write them below the auto-generated section.
- The
.envfile contains your private API keys. It is added to.gitignoreso it will not be uploaded to GitHub.
Similar Articles
@tom_doerr: Converts academic papers into structured Obsidian notes https://github.com/917Dhj/DeepPaperNote…
DeepPaperNote is an open-source tool that automates converting academic papers into structured Obsidian notes, handling metadata, figures, and note generation for deep reading.
@coldsake_: https://x.com/coldsake_/status/2067374833692815638
This article introduces how to use Obsidian combined with AI tools like Codex/CC to build an academic literature management system, enabling automatic classification, duplicate checking, generation of wiki pages and an academic toolbox, and shares methods for reading literature and improving academic skills.
@ziwenxu_: https://x.com/ziwenxu_/status/2053241837453029439
The article details a workflow for creating an automated 'Codex Knowledge Vault' using Obsidian, where AI agents automatically ingest and organize daily bookmarks into a structured knowledge base to reduce context debt.
@IndieDevHailey: A blessing for researchers! This open-source tool helps you break through the sea of literature and manage the entire academic workflow with one click. Still struggling with slow literature research, writer's block, improper citations, and harsh peer reviews? Check out this open-source repository: academic-research-skills. It's not an AI ghostwriting tool, but a reliable human-AI collaboration framework—…
Recommends the open-source repository academic-research-skills, which provides a set of human-AI collaborative tools for the entire academic research workflow, including in-depth literature research, paper writing, peer review simulation, and citation audit. It supports AI assistance while keeping the user in control, suitable for graduate students and researchers.
@fluixoo: https://x.com/fluixoo/status/2066481993727004860
A Twitter thread detailing a structured workflow for AI-assisted research and writing, using NotebookLM for source ingestion, Claude for drafting, and Obsidian for knowledge management. Emphasizes the importance of solid source material and separating research from writing.