Skip to content

Latest commit

 

History

History
executable file
·
58 lines (42 loc) · 3.45 KB

README.md

File metadata and controls

executable file
·
58 lines (42 loc) · 3.45 KB

ohmyrepo

use webhook to analysis automaticly that who stared your repository, where are they. Besides you can fellow some users.

================

中文文档

Let's start

  • pip install -r requirement.txt
  • enter into this url and make your own application, then get the CLIENT_ID, CLIENT_SECRET REDIRECT_URL and ACCESS_TOKEN_URL.
  • check out the file settings.py and make your own configure. Attention: WEBHOOK_URL will be used to record some repository. After this project work well, you can see it in the repository settings. web_hook
  • type this command python app.py, then you can watch it in http://127.0.0.1:8888
  • If you deloy it, we recommand you use supervisor, nginx, this is the details

The tech we use

Project Details

  • If you want to record your repository, you should login with github firstly. We need your authorization include repo's webhook reading and writing and user's following.
  • Secondly, you add your repository in the ohmyrepo.ml, we set your repo's webhook payload url to ours and we initialize by recode history event.
  • Thirdly, once someone star your repo, github webhook immediately post an event to our server and we insert it to database.
  • We use mongodb to store user and repo information. The mongodb is awesome, especially its query statement. And we use motor as tornado's mongo asynchronous client.
  • We use redis as tornado cache. Thanks for cloverstd's good cache library.

Project Screen

2 3 4 5 6 7 8

Version 0.1

  • update framework to the new version. Python3.x tornado 6.x

Version 0.0.2

add origanzation support and fix user's following list bug.

Version 0.0.1

show users' repo star, follower infomations in the human style.

TODO

  • weibo share

Q & A

  • Why my repository's star recode is not as enough as it should be?

Because when initialize the repository, we can only get small amount pages history of event records by github api. As the github api said, in order to keep the API fast for everyone, pagination is limited for this resource.

  • Why my repository's followers distribution is not equal to the stars amount?

Some body do not set their location, besides we use geonames.org api to judge accurate name of your city. If you name it by nickname, take for example, you named Beijing of China to DiDU(帝都), we can not recognize it. We set the location to none. If you have better api than getnames.org, contact me([email protected]). Thanks.