Adding GitHub Download Count Badge to Readme Mark Down
Asked Answered
K

2

23

I would like to add a badge that counts the total number of downloads that happen for one of my projects that I have on GitHub. I came across this page that has all the image shields

https://shields.io/

![Github Releases](https://img.shields.io/github/downloads/atom/atom/latest/total.svg?style=plastic)

Any ideas on how I could add this to my project in GitHub?

Kempis answered 14/8, 2017 at 10:13 Comment(0)
F
40

You have to insert it as an image into your README. If your README is markdown (README.md) that should be like:

Syntax:

[![Github All Releases](https://img.shields.io/github/downloads/<-- User Name-->/<-- Your Repo Name-->/total.svg)]()

 Example

[![Github All Releases](https://img.shields.io/github/downloads/atom/atom/total.svg)]()

If you click on the badge on shields.io you can copy-paste markdown syntax you need to insert into README.md

Florri answered 14/8, 2017 at 11:53 Comment(5)
How does it count the downloads of my project that I have on GitHub?Kempis
I did in fact add it to my README, but it shows a total download of 755k which is not true for my project!Kempis
oh, sorry, you have to replace atom/atom with your username/project_nameFlorri
Hi @DmitriyBudnik , My badge show zero downloads, even though people have downloaded it. Any idea why?Kilburn
It depends on way you distribute your software. I guess it only counts downloads of packaged releases e.g. .zip files. Please refer to shields.io page: shields.io/category/downloads for detailsFlorri
E
4

Check out PePy for receiving the download count of your repository and the code for your badge. Here's an example:

https://pepy.tech/project/video2tfrecord

Erzurum answered 26/4, 2018 at 14:36 Comment(1)
the link attached is brokenUnknot

© 2022 - 2024 — McMap. All rights reserved.