You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script will pull X pages from the results of package dependents and sort them by number of stars on GH. They seem to be sorted by recent change by default, but there is no way to sort them by stars.
Install
git clone https://github.com/dteiml/github-by-stars && \
cd github-by-stars && \
npm i
Setup
Go to https://github.com. Open Network tab in dev tools. Refresh page and click on first request. Copy the Request headers to your clipboard.
Create a .env file and paste the headers. They should should something like this:
Host = github.com
Connection = keep-alive
...
That's it!
Run
npx nodemon index.js
Customize
Everything can be customized from the terminal:
--author - either user or organization account name
--name - package name
--begin - which page we should begin at. The pages are unfortunately in a linked list, so if you want to get page X, you must have in the past gotten page X-1. So for first run the only value this can be is 0.
--end - end at which page (excluding this one). Results are 30 per page.
So example usage would be node index.js --author facebook --name react --begin 0 --end 100