Skip to main content

GoogleScholar Badge Generator

shields.io does not provide an API to help generate citation badges of articles/profiles on Google Scholar. Therefore, I create this repository to build us such a tool. Need citation badges but cannot find a proper tool? Try GSBG! You can even make yourself a GoogleScholar version of shields.io with GitHub actions! Take a look at Usage below.

Please star🌟 this repo to help others notice GSBG if you think it is useful. Thank you!

❖ Installation

You can install GSBG via pip: pip install gsbg, or from the latest source code: pip install https://github.com/WenjieDu/Google_Scholar_Badge_Generator/archive/main.zip.

❖ Usage

Apart from the below examples, you can also integrate GSBG with GitHub workflows to automatically generate badges for your articles/profiles, save them in your repo, and update them periodically. Please take a look at https://github.com/WenjieDu/WenjieDu for an example. The workflow .github/workflows/gene_citation_badges.yml will regularly run the generating script scripts/gene_google_scholar_badges.py to maintain the badges under figs/citation_badges.

You can fork my repo and modify the script and the workflow to fit your own needs. If you meet any question, please raise an issue. I'll try my best to help.

import gsbg

article_link = "https://scholar.google.com/citations?view_op=view_citation&hl=en&user=j9qvUg0AAAAJ&citation_for_view=j9qvUg0AAAAJ:Y0pCki6q_DkC"
profile_link = "https://scholar.google.com/citations?user=j9qvUg0AAAAJ&hl=en"

article_citation_num = gsbg.fetch_article_citation_num(article_link)
profile_citation_num = gsbg.fetch_profile_citation_num(profile_link)
gsbg.gene_citation_badge_link(
    link='https://scholar.google.com/citations?user=j9qvUg0AAAAJ&hl=en', 
    link_type="profile",
)
gsbg.gene_citation_badge_svg(
    link='https://scholar.google.com/citations?user=j9qvUg0AAAAJ&hl=en', 
    link_type="profile",
    svg_name='gsbg.svg',
    path_to_save='generated_badges',
)
🏠 Visits GSBG visits

Metadata

Release files for gsbg 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gsbg 0.1.3
File Size Uploaded Provenance Actions
gsbg-0.1.3.tar.gz 18.2 kB Without provenance Details for gsbg-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gsbg 0.1.3
File Interpreter ABI Platform Actions
gsbg-0.1.3-py3-none-any.whl Python 3 none any Details for gsbg-0.1.3-py3-none-any.whl

Total release size: 37.8 kB

Release files / gsbg-0.1.3.tar.gz

Download URL gsbg-0.1.3.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4847468ed0942be201284fda78ba155d45c811ce6ec4b2e4a25a27728a7b13c2
BLAKE2b-256 checksum
How to use checksums
1d6541171bd4830964ac10e3ba8695ef96cf440e887a646fa4628a764fb03b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / gsbg-0.1.3-py3-none-any.whl

Download URL gsbg-0.1.3-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bd6343dcc83f8757a6e9463f74d32e688c7d5a6aaa50a8addbd038eda57960e
BLAKE2b-256 checksum
How to use checksums
14f965c9674b935cad094a587eb2cdcffa7ae2572f833d2ff3ccbf1e92cee21f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for gsbg 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page