Skip to content

ControlNet/citation-badge

Repository files navigation

Citation Badge

Automatically generate citation badges from Google Scholar and a manually supplied Web of Science peer review count.

Example:

Citations badge: Reviews badge:

Quick Setup

  1. Fork this repository
  2. Set up GitHub Secrets (Repository Settings → Secrets → Actions):
    • SCHOLAR: Your Google Scholar ID
    • WOS_OVERWRITE: Your Web of Science peer review count (optional)
    • DEPLOY_TOKEN: Used with DEPLOY_TARGET to trigger another repository's deployment workflow after citation data updates (optional)
    • DEPLOY_TARGET: Target workflow in owner/repo@ref:workflow_id format, such as yourusername/your-site@main:deploy.yml (optional)
  3. Enable GitHub Pages to use the dist branch

Self-hosted Docker runtime

This is additive to the existing GitHub Actions/GitHub Pages flow, not a replacement.

Run the service:

docker run --rm -d --name citation-badge \
  -p 8000:8000 \
  -v "$PWD/data:/data" \
  -e PUID="$(id -u)" \
  -e PGID="$(id -g)" \
  -e SCHOLAR='WLN3QrAAAAAJ' \
  controlnet/citation-badge

Or if you prefer to build by yourself:

docker build -t controlnet/citation-badge .

Required env vars:

  • SCHOLAR: Your Google Scholar ID
  • WOS_OVERWRITE is optional and generates the Web of Science peer review badge when set to a non-negative integer

Optional runtime user mapping:

  • PUID defaults to 1000
  • PGID defaults to 1000
  • Set them to $(id -u) / $(id -g) if you want the containerized service process to match your current host user

Mounted state volume:

  • -v "$PWD/data:/data" keeps the service’s runtime state and latest promoted release outside the container.

Then you can access the served files as same as the GitHub, such as localhost:8000/all.svg, localhost:8000/citation.json, etc.

Usage

Badges update automatically hourly. Embed them in your sites:

![Citations](https://yourusername.github.io/citation-badge/all.svg)
![Paper Citations](https://yourusername.github.io/citation-badge/<GOOGLE_SCHOLAR_ID>_<PUBLICATION_ID>.svg)
![Peer Reviews](https://yourusername.github.io/citation-badge/review.svg)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors