Recently, I started experimenting with the GitHub API getting specific data from public repos. Long story short, I want to grab specific parts of the README.md file from a repo.
For example, the master branch from Facebook’s react repository I want to grab the text under the Documentation header the GitHub API. Is this possible? Any methods of achieving this are welcome. Thank you!
API : React README.md API Data
Public Github URL: React public repo
2
Answers
There is no way to do this with the API, but one easy way is with
sed
; try this from a Linux command line:This will return everything between the Documentation header and the next one.
There is a very awesome way to use any GitHub repository MARKDOWN.md file with the use of API.
the above API returns everything in your README.md file in raw MarkDown format.
api-use-picture