Nagasaki45 / krihelinator

"Trendiness of open source software should be assessed by contribution rate, not by stars" - Meir Kriheli
http://krihelinator.xyz/
MIT License
45 stars 2 forks source link

Add support for badges #34

Closed blueyed closed 8 years ago

blueyed commented 8 years ago

I think it would be nice to be able to have your own badge, which would also help to improve to grow the pool of processes to scale. (As far as I understand those get pulled from the list on GitHub at the moment only?!)

Nagasaki45 commented 8 years ago

Hi @blueyed, thanks for your interest in the project.

I'm not sure I understand your requirement. Can you please elaborate?

BTW, regarding the design/architecture of the project, there are two ways in which new repositories can enter the Krihelinator DB:

  1. There is a poller that loop through all the github repositories, using their API. Each repo pulse page is then scraped and if the stats are above a certain threshold it enters the DB.
  2. There is a periodic process (every 6 hours) that scrape the github trending page and pass everything to the pulse page scraper above.

All of the statistics (num of authors, commits, PR and issues, per week) are saved in the DB in one of the occasions above. Nothing happens on the request-response loop, only fetching from DB and template rendering.

blueyed commented 8 years ago

Thanks for explaining the overall process.

I've meant to have something like the Travis CI badge, where you have an URL that renders some image/SVG/HTML to display the stats. This could then be used to in your repo's README etc. This would not trigger the re-calculation, but provide a way to display the data outside of http://krihelinator.xyz/.

Nagasaki45 commented 8 years ago

Wow! thats a great idea! I will definitely add it soon.

It will require a minor change: Instead of rescraping the pulse page each time I will add a new field to the model like "user_requested". These will not be removed in the periodic process.

blueyed commented 8 years ago

Awesome, thanks!

Could this also generate HTML that would expand on clicking it like with the landing page (where you then see the number of authors etc)? btw: I also wonder why http://krihelinator.xyz/badge/blueyed/vim-diminactive displays 0? (for https://github.com/blueyed/vim-diminactive)

Nagasaki45 commented 8 years ago

Could this also generate HTML that would expand on clicking it like with the landing page (where you then see the number of authors etc)?

Good idea! Can you please open a separate ticket for this?

btw: I also wonder why http://krihelinator.xyz/badge/blueyed/vim-diminactive displays 0? (for https://github.com/blueyed/vim-diminactive)

The Krihelimeter is calculated based on last week activity, scraped from the pulse page of the project. There was no activity on this project in the past week, therefore the Krihelimeter is 0.