Skip to main content

One-click bibliometric analysis CLI tool

Project description

Citationer

One-click bibliometric analysis CLI tool — scan, import, analyze, and visualize your literature collection in the terminal.

License: MIT Python 3.11+ CI

Citationer is a lightweight, local-first, zero-config CLI tool for researchers. Drop into a directory with bibliographic export files, run a single command, and get a complete literature analysis — from descriptive statistics with terminal charts to knowledge graphs and AI-powered topic labeling.


Features

Category Capability
🔍 Format Detection Auto-detect CNKI, Web of Science exports (.xlsx, .txt, .ciw)
📊 Descriptive Stats Yearly trends, top journals/authors/institutions, h-index — with terminal charts
📈 Terminal Charts Braille line charts + Unicode bar charts rendered directly in terminal
🔗 Network Analysis Keyword co-occurrence, author/institution collaboration, co-citation, bibliographic coupling
📝 Text Mining Tokenization (jieba + spaCy), keyword frequency, LDA/NMF topic modeling, TF-IDF summarization, clustering
🤖 LLM-Powered AI Topic labeling, literature review generation, trend identification, multi-dimensional classification — supports DeepSeek, OpenAI, Ollama
Configurable CLI-driven config (config show/set/init), env-var support, multi-provider LLM
🎨 Rich Terminal Color tables, progress bars, interactive HTML network graphs (Plotly)
📦 Pipe-friendly JSON/CSV/GEXF/GraphML export — works with grep, jq, Gephi, Cytoscape

Installation

# Recommended: isolated install via pipx
pipx install citationer

# Or via pip
pip install citationer

# With all optional dependencies (NLP, network, AI, viz)
pip install "citationer[all]"

# From source
git clone https://github.com/JasonCENG/citationer.git
cd citationer
pip install --no-build-isolation -e ".[all,dev]"

Quick Start

# 1. Check version
citationer --version

# 2. Navigate to your literature directory
cd /path/to/literature

# 2. Scan for bibliographic files
citationer scan

# 3. Import into the local database (auto-clears old data)
citationer import

# 4. Clean & deduplicate
citationer clean

# 5. View the overview dashboard
citationer stats overview

Command Reference

Data Management

citationer scan                  # Scan directory for bibliographic files
citationer status                # Quick status check
citationer import                # Import files (clears old data by default)
citationer import --keep         # Append to existing data
citationer clean                 # Validate & deduplicate records

Descriptive Statistics (stats)

citationer stats overview             # Dashboard: totals, years, h-index, languages
citationer stats yearly               # Braille line chart
citationer stats yearly --cumulative  # Dual bar+line chart
citationer stats yearly --table       # Data table
citationer stats journals --top 20    # Horizontal bar chart
citationer stats authors --top 20     # Bar chart + Price's Law core authors
citationer stats institutions --top 20 # Bar chart

Text Mining (text)

citationer text preprocess       # Tokenize + language detection
citationer text keywords --top 30     # Keyword frequency
citationer text keywords --per-year   # Keyword × year heatmap
citationer text topics --method lda   # LDA topic modeling
citationer text topics --method nmf   # NMF topic modeling
citationer text summarize              # TF-IDF extractive summary
citationer text cluster --method kmeans  # Document clustering

Network Analysis (network)

citationer network keywords --top 50 --threshold 3   # Co-occurrence network
citationer network coauthors --min-papers 2           # Author collaboration
citationer network coauthors --type institutions       # Institution collaboration
citationer network cocitation --top 30                 # Co-citation analysis
citationer network coupling --top 30                   # Bibliographic coupling

# Export formats: csv, gexf, graphml, html (interactive)
citationer network keywords --output-format gexf --output graph.gexf
citationer network coauthors --viz --output network.html

LLM-Powered Analysis (ai)

# Configure your LLM first
citationer config set llm.api_key sk-your-key
citationer config set llm.model deepseek-chat

citationer ai topics --auto-label     # Auto-label LDA topics
citationer ai summarize               # Generate literature review (200-500 words)
citationer ai trends                  # Identify research trends & gaps
citationer ai classify                # Multi-dimensional classification
citationer ai info                    # View LLM config & cache stats

# Preview without API call
citationer ai summarize --dry-run

Configuration (config)

citationer config show                # View all settings
citationer config set llm.api_key sk-xxx  # Set API key
citationer config set llm.model gpt-4o    # Change model
citationer config set llm.base_url https://api.openai.com/v1  # Change provider
citationer config init                # Initialize config file with defaults

LLM Provider Configuration

Citationer supports any OpenAI-compatible API. Edit .citationer/config.yaml or use env vars:

# .citationer/config.yaml
llm:
  api_key: "sk-xxx"
  model: "deepseek-chat"
  base_url: "https://api.deepseek.com"
  temperature: 0.3
  max_tokens: 4096
Provider base_url
DeepSeek https://api.deepseek.com
OpenAI https://api.openai.com/v1
Ollama (local) http://localhost:11434/v1

Environment variables override the config file: CITATIONER_LLM_API_KEY, CITATIONER_LLM_MODEL, etc.


Supported Bibliographic Formats

Source Format Extensions Status
Web of Science Plain text / Tab-delimited / Excel .txt, .ciw, .xlsx, .xls ✅ Stable
CNKI (知网) Excel export .xlsx ✅ Stable
Scopus CSV/Excel .csv, .xlsx 🔜 Phase 3
PubMed XML/MEDLINE .xml, .nbib 🔜 Phase 3
BibTeX / RIS Generic .bib, .ris 🔜 Phase 3

Development

# Install with all dependencies
pip install --no-build-isolation -e ".[all,dev]"

# Run tests
pytest tests/ -v

# Lint & type check
ruff check src/ tests/
mypy src/ --ignore-missing-imports

# Coverage report
pytest tests/ --cov=src/citationer --cov-report=term-missing

Documentation


License

MIT © Jason Yu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

citationer-2.1.9.tar.gz (78.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

citationer-2.1.9-py3-none-any.whl (80.4 kB view details)

Uploaded Python 3

File details

Details for the file citationer-2.1.9.tar.gz.

File metadata

  • Download URL: citationer-2.1.9.tar.gz
  • Upload date:
  • Size: 78.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for citationer-2.1.9.tar.gz
Algorithm Hash digest
SHA256 cad4a00222c92078345adf8e59eed66e266fbbe1a1e8d25ca60f30d01cded901
MD5 640117884197afcd871f4ff57d1eb715
BLAKE2b-256 522e11cbdf1fc5f2b779db31dbf04023f8bf5952de3389370e79773fbf957c40

See more details on using hashes here.

File details

Details for the file citationer-2.1.9-py3-none-any.whl.

File metadata

  • Download URL: citationer-2.1.9-py3-none-any.whl
  • Upload date:
  • Size: 80.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for citationer-2.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 694338e9ffdb152cc62d9838684dca53811ce6a997b0747e2ef31a297df260ed
MD5 cf06c107e6ae112f0a5fa946c6319d94
BLAKE2b-256 8e510215d52af223c7f26c31310365169bc0d15da932b2c6177afbf4d0f9d442

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page