gsbg


Namegsbg JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/WenjieDu/Google_Scholar_Badge_Generator
SummaryA tool for Google Scholar citation badge generation.
upload_time2023-09-11 15:59:23
maintainer
docs_urlNone
authorWenjie Du
requires_python>=3.5
licenseGPL-3.0
keywords google scholar citation citation number shields.io badge svg generating
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GoogleScholar Badge Generator

[shields.io](https://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](-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](https://github.com/WenjieDu/WenjieDu) for an example.
The workflow [.github/workflows/gene_citation_badges.yml](https://github.com/WenjieDu/WenjieDu/blob/main/.github/workflows/gene_citation_badges.yml)
will regularly run the generating script [scripts/gene_google_scholar_badges.py](https://github.com/WenjieDu/WenjieDu/blob/main/scripts/gene_google_scholar_badges.py)
to maintain the badges under [figs/citation_badges](https://github.com/WenjieDu/WenjieDu/tree/main/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](https://github.com/WenjieDu/Google_Scholar_Badge_Generator/issues).
I'll try my best to help.


```python
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',
)
```


<details>
<summary>🏠 Visits</summary>
<a href="https://github.com/WenjieDu/GSBG">
    <img alt="GSBG visits" align="left" src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FWenjieDu%2FGSBG&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false">
</a>
</details>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/WenjieDu/Google_Scholar_Badge_Generator",
    "name": "gsbg",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "Google Scholar,citation,citation number,shields.io,badge,svg,generating",
    "author": "Wenjie Du",
    "author_email": "wenjay.du@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1d/65/41171bd4830964ac10e3ba8695ef96cf440e887a646fa4628a764fb03b63/gsbg-0.1.3.tar.gz",
    "platform": null,
    "description": "# GoogleScholar Badge Generator\n\n[shields.io](https://shields.io) does not provide an API to help generate citation badges of articles/profiles \non Google Scholar. Therefore, I create this repository to build us such a tool.\nNeed 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](-usage) below. \n\nPlease star\ud83c\udf1f this repo to help others notice GSBG if you think it is useful. Thank you!\n\n## \u2756 Installation\nYou can install GSBG via pip: `pip install gsbg`, or from the latest source code: \n`pip install https://github.com/WenjieDu/Google_Scholar_Badge_Generator/archive/main.zip`.\n\n## \u2756 Usage\nApart from the below examples, you can also integrate GSBG with GitHub workflows to automatically generate badges \nfor your articles/profiles, save them in your repo, and update them periodically.\nPlease take a look at [https://github.com/WenjieDu/WenjieDu](https://github.com/WenjieDu/WenjieDu) for an example.\nThe workflow [.github/workflows/gene_citation_badges.yml](https://github.com/WenjieDu/WenjieDu/blob/main/.github/workflows/gene_citation_badges.yml)\nwill regularly run the generating script [scripts/gene_google_scholar_badges.py](https://github.com/WenjieDu/WenjieDu/blob/main/scripts/gene_google_scholar_badges.py)\nto maintain the badges under [figs/citation_badges](https://github.com/WenjieDu/WenjieDu/tree/main/figs/citation_badges).\n\nYou can fork my repo and modify the script and the workflow to fit your own needs.\nIf you meet any question, please [raise an issue](https://github.com/WenjieDu/Google_Scholar_Badge_Generator/issues).\nI'll try my best to help.\n\n\n```python\nimport gsbg\n\narticle_link = \"https://scholar.google.com/citations?view_op=view_citation&hl=en&user=j9qvUg0AAAAJ&citation_for_view=j9qvUg0AAAAJ:Y0pCki6q_DkC\"\nprofile_link = \"https://scholar.google.com/citations?user=j9qvUg0AAAAJ&hl=en\"\n\narticle_citation_num = gsbg.fetch_article_citation_num(article_link)\nprofile_citation_num = gsbg.fetch_profile_citation_num(profile_link)\ngsbg.gene_citation_badge_link(\n    link='https://scholar.google.com/citations?user=j9qvUg0AAAAJ&hl=en', \n    link_type=\"profile\",\n)\ngsbg.gene_citation_badge_svg(\n    link='https://scholar.google.com/citations?user=j9qvUg0AAAAJ&hl=en', \n    link_type=\"profile\",\n    svg_name='gsbg.svg',\n    path_to_save='generated_badges',\n)\n```\n\n\n<details>\n<summary>\ud83c\udfe0 Visits</summary>\n<a href=\"https://github.com/WenjieDu/GSBG\">\n    <img alt=\"GSBG visits\" align=\"left\" src=\"https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FWenjieDu%2FGSBG&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=false\">\n</a>\n</details>\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "A tool for Google Scholar citation badge generation.",
    "version": "0.1.3",
    "project_urls": {
        "Download": "https://github.com/WenjieDu/Google_Scholar_Badge_Generator/archive/main.zip",
        "Homepage": "https://github.com/WenjieDu/Google_Scholar_Badge_Generator"
    },
    "split_keywords": [
        "google scholar",
        "citation",
        "citation number",
        "shields.io",
        "badge",
        "svg",
        "generating"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "14f965c9674b935cad094a587eb2cdcffa7ae2572f833d2ff3ccbf1e92cee21f",
                "md5": "a29be027ec41bab7466e690923e42e12",
                "sha256": "2bd6343dcc83f8757a6e9463f74d32e688c7d5a6aaa50a8addbd038eda57960e"
            },
            "downloads": -1,
            "filename": "gsbg-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a29be027ec41bab7466e690923e42e12",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 19588,
            "upload_time": "2023-09-11T15:59:22",
            "upload_time_iso_8601": "2023-09-11T15:59:22.164998Z",
            "url": "https://files.pythonhosted.org/packages/14/f9/65c9674b935cad094a587eb2cdcffa7ae2572f833d2ff3ccbf1e92cee21f/gsbg-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d6541171bd4830964ac10e3ba8695ef96cf440e887a646fa4628a764fb03b63",
                "md5": "162180033020d1f58bcad7c024506a94",
                "sha256": "4847468ed0942be201284fda78ba155d45c811ce6ec4b2e4a25a27728a7b13c2"
            },
            "downloads": -1,
            "filename": "gsbg-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "162180033020d1f58bcad7c024506a94",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 18174,
            "upload_time": "2023-09-11T15:59:23",
            "upload_time_iso_8601": "2023-09-11T15:59:23.758131Z",
            "url": "https://files.pythonhosted.org/packages/1d/65/41171bd4830964ac10e3ba8695ef96cf440e887a646fa4628a764fb03b63/gsbg-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-11 15:59:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "WenjieDu",
    "github_project": "Google_Scholar_Badge_Generator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "gsbg"
}
        
Elapsed time: 0.72378s