hedyhli / starcli

:sparkles: Browse trending GitHub projects from your command line
https://pypi.org/project/starcli/
MIT License
555 stars 50 forks source link

Show +XX stars today, week, month, like in github trending page #44

Closed hedyhli closed 4 years ago

hedyhli commented 4 years ago

In github explore, the trending tab, we will find this: Screenshot_20200711_074246

We should also put something like this "+xx stars today" in our output, could probably start with list layout and see how it goes.

Also, we could add a new option --date-range like the following screenshot: Screenshot_20200711_074542

The new option could use the click.Choice to have a choice between today, week, or month like the above picture. If you don't know how to do the choice you can check out the --layout or --order in __main__.py line 20: https://github.com/hedythedev/starcli/blob/938d96ae9852a1436dbd47068aeaa651bcc49850/starcli/__main__.py#L17-L22

Not sure if the github API can provide the information, if not we might have to scrape the data from the website itself: https://github.com/trending?since=weekly change weekly to daily, monthly etc.

Remember to update the readme if you are adding and/or modifying the date options

Saif807380 commented 4 years ago

I'd like to work on this. It is similar to adding spoken language filter and would require scraping. So I'd just have to add a few lines to scrape this as well.

hedyhli commented 4 years ago

yeah, the info is on the same trending page, with browsing popular developers as well. you could probably rename search_by_spoken_language to search_from_trending or something to grab all the info from that page in a single function :D

Saif807380 commented 4 years ago

Should I proceed on the same branch or create a new one?

hedyhli commented 4 years ago

I've just merged your pr and pushed more commits so I would suggest you to merge back the changes to your fork, if you don't know how to do that just delete the fork then fork it again

hedyhli commented 4 years ago

Thanks for your interest as this would also help with #57