A Python-based tool that automatically tracks and records citation statistics from Google Scholar. It generates daily reports of citation counts, h-index, and individual paper statistics in a clean markdown format.
- 🤖 Automated daily tracking of Google Scholar citations
- 📊 Tracks overall citation count and h-index
- 📝 Individual paper citation statistics
- 📈 Historical citation data tracking
- 📑 Clean markdown report generation
- ⚙️ Easy configuration with Google Scholar ID
- 🔄 GitHub Actions integration for automatic updates
- Python 3.x
- Git
-
Clone the repository:
git clone https://github.com/yourusername/scholar-citation-tracker.git cd scholar-citation-tracker -
Install required packages:
pip install -r requirements.txt
-
Configure your Google Scholar Profile:
The most reliable way to track your profile is by using your Google Scholar ID.
How to find your Google Scholar ID:
- Go to your Google Scholar profile page.
- Look at the URL in your browser's address bar.
- The URL will look something like this:
https://scholar.google.com/citations?user=VtK5lwUAAAAJ&hl=en - Your Scholar ID is the string of characters after
user=. In the example above, it'sVtK5lwUAAAAJ.
Update the configuration:
- Open the
config.jsonfile. - Replace
"YOUR_SCHOLAR_ID_HERE"with your actual Google Scholar ID:
{ "author_id": "VtK5lwUAAAAJ", "author_query": null }Alternatively, you can track by name, but this is less reliable:
{ "author_id": null, "author_query": "Your Name Institution" }
Run the tracker manually from your terminal:
python run.pyThe script will:
- Fetch your latest Google Scholar statistics using the configured ID.
- Update the citation history in
data/citation_history.json. - Generate an updated markdown report in
data/citations.md. - Create trend charts and a dashboard in the
data/directory.
This project can be automated to run daily using GitHub Actions.
- Fork this repository.
- Enable GitHub Actions in your fork:
- Go to your repository's "Settings" > "Actions" > "General".
- Under "Workflow permissions," select "Read and write permissions."
- The tracker will automatically run daily at 01:00 UTC. You can change the schedule in
.github/workflows/update_citations.yml.
scholar_tracker/
├── .github/
│ └── workflows/
│ └── update_citations.yml # GitHub Actions configuration
├── data/
│ ├── citation_history.json # Historical citation data
│ ├── citations.md # Generated markdown report
│ ├── dashboard.html # Interactive citation dashboard
│ ├── citation_trends.png # Trend chart for citations
│ ├── paper_trends.png # Trend chart for top papers
│ └── tracker.log # Log file for debugging
├── src/
│ ├── scholar_tracker.py # Core tracking functionality
│ ├── markdown_writer.py # Markdown report generator
│ └── chart_generator.py # Chart generation logic
├── config.json # Configuration file
├── requirements.txt
├── run.py # Main execution script
└── README.md
The generated data/citations.md includes:
- Overall citation statistics (Total Citations, H-index)
- A summary of new citations since the last update.
- Per-paper citation counts.
- Historical data trends.
# Citation Statistics
**Last updated:** 2024-07-21
## Overall Statistics
- **Total Citations:** 1234 (+10)
- **H-index:** 25
## New Citations Today
- **Paper Title A:** 5 new citations (100 -> 105)
- **Paper Title B:** 5 new citations (50 -> 55)
## Top Papers by Citation
| Paper | Citations | Year |
|-----------------------|-----------|------|
| My Awesome Paper 1 | 105 | 2023 |
| Another Great Paper | 55 | 2022 |
...To change the content or layout of the markdown report, edit src/markdown_writer.py.
Modify the cron schedule in .github/workflows/update_citations.yml to change how often the tracker runs.
- Rate Limiting: Google Scholar may temporarily block requests if updated too frequently. The default daily schedule is usually safe. If you encounter errors, check
data/tracker.logfor details. - GitHub Actions Failures:
- Permissions: Ensure "Read and write permissions" are enabled for Actions in your repository settings. This allows the workflow to commit the updated data files.
- Workflow Not Running: Check that the
.github/workflows/update_citations.ymlfile exists on your main branch. Scheduled actions only run on the default branch.
Contributions are welcome! Please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
- scholarly for providing a great interface to Google Scholar.
- GitHub Actions for the powerful automation.