Installation & Setup#
Prerequisites#
Python 3.7+ (Python 3.8+ recommended)
pip (Python package manager)
Git (optional - to clone from GitHub)
Ollama (optional - for AI-powered filtering)
Installation Steps#
1. Get Review Buddy#
Option A: Clone from GitHub (recommended)
git clone https://github.com/leonardozaggia/review_buddy.git
cd review_buddy
Option B: Download ZIP
Download from GitHub and extract
Navigate to the folder in terminal
2. Install Dependencies#
pip install -r requirements.txt
Core dependencies (always installed):
requests>=2.31.0- HTTP requestslxml>=4.9.0- HTML/XML parsingpython-dotenv>=1.0.0- Environment variable managementbeautifulsoup4>=4.12.0- HTML parsingtqdm>=4.66.0- Progress barsbibtexparser>=1.4.0- BibTeX file handlingrispy>=0.7.0- RIS file handling
Optional dependencies:
scholarly>=1.7.0- Google Scholar (install if using Scholar search)langdetect>=1.0.9- Language detection (for abstract filtering)scihub- Sci-Hub access (install if using Sci-Hub downloads)
3. Configure API Keys#
Create a .env file in the project root:
cp .env.example .env
Edit .env with your credentials (at least one API key required):
# Scopus (Recommended - best coverage)
SCOPUS_API_KEY=your_scopus_api_key_here
# PubMed (Required for biomedical papers and better downloads)
PUBMED_EMAIL=your.email@example.com
PUBMED_API_KEY=optional_key_for_higher_rate_limits
# Unpaywall (Highly recommended - improves download success)
UNPAYWALL_EMAIL=your.email@example.com
# IEEE Xplore (Optional - for engineering papers)
IEEE_API_KEY=your_ieee_api_key_here
# Ollama (Optional - for AI filtering)
OLLAMA_MODEL=llama3.1:8b
Minimum setup: Either SCOPUS_API_KEY OR PUBMED_EMAIL (both recommended)
For best results: Configure all available sources
4. Obtain API Keys#
Scopus (Highly Recommended)#
Website: https://dev.elsevier.com/
How: Create account β Request API key
Free tier: 5,000 requests/week
Coverage: Best for peer-reviewed publications
PubMed (Free, Highly Recommended)#
Email: Any valid email (no registration needed)
API Key (optional): Register for key to increase rate limits (3β10 req/sec)
Coverage: Best for biomedical/life sciences
Unpaywall (Free, Recommended)#
Email: Any valid email (no registration)
Benefit: Significantly improves open access paper discovery
Use: Add your email to
.envasUNPAYWALL_EMAIL
IEEE Xplore (Optional)#
Website: https://developer.ieee.org/
How: Register β Request API key
Free tier: 200 queries/day
Coverage: Engineering and computer science
Ollama (Optional - for AI Filtering)#
Website: https://ollama.ai/
How: Download and install Ollama β Pull model:
ollama pull llama3.1:8bModels: llama3.1:8b (recommended), mistral, etc.
Use: Local LLM for intelligent abstract filtering
Verify Installation#
Quick Verification#
The easiest way to verify is to run the fetch script:
python 01_fetch_metadata.py
You should see:
================================================================================
REVIEW BUDDY - FETCH PAPER METADATA
================================================================================
β Available sources: Scopus, PubMed, arXiv, Google Scholar, IEEE Xplore
If you see β ERROR: No API keys configured!, check your .env file.
Manual Test (Optional)#
Create a test script to check configuration:
from pathlib import Path
import sys
sys.path.insert(0, str(Path(__file__).parent))
from src.config import Config
config = Config()
print("Available sources:")
if config.has_scopus_access():
print(" β Scopus configured")
if config.has_pubmed_access():
print(" β PubMed configured")
if config.has_arxiv_access():
print(" β arXiv available (no key needed)")
if config.has_scholar_access():
print(" β Google Scholar available")
if config.has_ieee_access():
print(" β IEEE Xplore configured")
Test Search (Optional)#
Run a small test search:
# Edit 01_fetch_metadata.py to set:
# QUERY = "machine learning"
# MAX_RESULTS_PER_SOURCE = 5
python 01_fetch_metadata.py
Check that results/references.bib is created with papers.
Troubleshooting#
No API Keys Configured#
Error: β ERROR: No API keys configured!
Solution:
Check that
.envfile exists in project rootAdd at least one API key (Scopus or PubMed email)
Restart your terminal/IDE
Import Errors#
Error: ModuleNotFoundError: No module named 'src'
Solution:
# Run scripts from project root (where src/ folder is)
cd /path/to/review_buddy
python 01_fetch_metadata.py
API Key Not Working#
Error: Invalid API key or Authentication failed
Solution:
# Verify .env file is in project root
ls .env
# Check environment variables load correctly
python -c "from dotenv import load_dotenv; import os; load_dotenv(); print('Scopus:', os.getenv('SCOPUS_API_KEY')[:10] if os.getenv('SCOPUS_API_KEY') else 'Not set')"
Rate Limit Errors#
Error: Rate limit exceeded
Solution:
PubMed: Get API key to increase from 3β10 req/sec
Scopus: Check weekly quota at dev.elsevier.com
Wait: Rate limits reset after a few minutes
No Papers Found#
Error: Search completes but finds 0 papers
Solution:
Try a simpler query:
"machine learning"Check year range (some databases lag by 1-2 years)
Verify API keys are valid
Try a different source
Language Detection Issues#
Error: langdetect not installed
Solution:
pip install langdetect
Or disable language filtering in 02_abstract_filter.py:
FILTERS_ENABLED = {
'non_english': False, # Disable
# ... other filters
}
Ollama Not Working (AI Filtering)#
Error: Failed to initialize Ollama client
Solution:
Install Ollama: https://ollama.ai
Pull model:
ollama pull llama3.1:8bCheck Ollama is running:
ollama listVerify URL in
.env:OLLAMA_URL=http://localhost:11434
Whatβs Next?#
Proceed to Usage Examples to learn how to:
Configure and run searches across multiple databases
Filter papers by abstract content (keyword or AI)
Download PDFs with intelligent fallback strategies
Export results in multiple formats