Basically, I’d like to gather a list of links to github repos, and be able to flick through a list if readmes. Anyone know of anything that does this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use GitHub’s Web API.
I’ll demonstrate with the Spoon-Knife repo:
First, you make a request to get the readme file(ofcourse, replace
octocat/Spoon-Knifewith the username&reponame you need):Notice the
html_urlfield – that’s the HTML link to the file in the GitHub Web-GUI display. But since you only want the contents of the file, you’ll need to changeblobtoraw:Ofcourse, you would probably want to use the HTTP facilities of whatever programming language you are using instead of
curlto query the GitHub server.EDIT
Instead of making additional GET request, you can decode the
contentfield using a base64 decoder: