Skip to content

Add cpp-linter download stats badge #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 4, 2022
Merged

Conversation

shenxianpeng
Copy link
Contributor

@shenxianpeng shenxianpeng commented Sep 4, 2022

Just want to know how many times cpp-linter has been downloaded every week.

@shenxianpeng shenxianpeng added the documentation Improvements or additions to documentation label Sep 4, 2022
@2bndy5
Copy link
Contributor

2bndy5 commented Sep 4, 2022

We could track the number of downloads per version using https://pepy.tech/project/cpp-linter which also gives a monthly and all-time totals.

@shenxianpeng
Copy link
Contributor Author

shenxianpeng commented Sep 4, 2022

OK, let's change the link to https://pepy.tech/project/cpp-linter , I like this one.

@2bndy5
Copy link
Contributor

2bndy5 commented Sep 4, 2022

what about , So it is clear that these are downloads from PyPI (not from Github)

@shenxianpeng
Copy link
Contributor Author

Nice!

@shenxianpeng
Copy link
Contributor Author

Updated

@shenxianpeng shenxianpeng requested a review from 2bndy5 September 4, 2022 04:28
@2bndy5
Copy link
Contributor

2bndy5 commented Sep 4, 2022

we could even add a logo...

@2bndy5
Copy link
Contributor

2bndy5 commented Sep 4, 2022

On second thought, I think green color makes the text hard to read

@shenxianpeng shenxianpeng force-pushed the add-download-stats-badge branch from dbaef72 to 735fdd1 Compare September 4, 2022 04:33
@2bndy5
Copy link
Contributor

2bndy5 commented Sep 4, 2022

dark green is easier to read:

@shenxianpeng
Copy link
Contributor Author

Done :)

@shenxianpeng shenxianpeng merged commit 33a9426 into main Sep 4, 2022
@shenxianpeng shenxianpeng deleted the add-download-stats-badge branch September 4, 2022 04:38
@shenxianpeng
Copy link
Contributor Author

shenxianpeng commented Sep 4, 2022

I remembered why I did not use https://pepy.tech/project/cpp-linter instead of https://pypistats.org/packages/cpp-linter
Because date in badge is different with the data on https://pepy.tech/project/cpp-linter which is 416

If we used the badge Downloads from pepy.tech, it seems does not support logo, logoColor, etc.

@shenxianpeng
Copy link
Contributor Author

I can create a similar badge from pepy.tech, but it does not support to add a logo.

Downloads

Maybe we have to use https://img.shields.io/badge/dynamic/json to create a custom badge if needed.

@2bndy5
Copy link
Contributor

2bndy5 commented Sep 4, 2022

I noticed you didn't use the customized badge from pepy tech... I'm ok with how it is now.

I think there's a way to embed a custom logo using a base64 string in img.io badges, but it seems a fragile.

@2bndy5
Copy link
Contributor

2bndy5 commented Sep 4, 2022

Got it to work finally!

@2bndy5
Copy link
Contributor

2bndy5 commented Sep 4, 2022

FYI, I had to resize the logo to 14 px logo_small and encode it using this site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants