@weborigami/gist
v0.0.2
Published
This [Origami](https://weborigami.org) extension returns an async tree for a [GitHub gist](https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists#about-gists).
Downloads
4
Readme
This Origami extension returns an async tree for a GitHub gist.
To use this, you will need to first obtain a GitHub fine-grained personal access token.
- Follow those instructions to obtain a token, which will be a sequence of letters and numbers. Copy the token.
- Paste the token into a new local file called, e.g.,
githubToken
. - It's important to not check that file into source control. Create a
.gitignore
file and add the file's name to it.
Usage
- Use npm to install the main
@weborigami/origami
package and this@weborigami/gist
extension. - Obtain a GitHub token (above).
- Identify the ID at the end of the GitHub gist you want to read. Example: for the gist at
https://gist.github.com/JanMiksovsky/2d6e386378732c01110e2c61c3dadb76, then ID is
2d6e386378732c01110e2c61c3dadb76
.
You can then use the Origami CLI to display all the files in the gist:
$ ori "package:@weborigami/gist(githubToken)/2d6e386378732c01110e2c61c3dadb76"
README.md: This is the Read Me file.
data.json: |-
{
"message": "Hello, world!"
}
Or traverse a specific file and value in the gist:
$ ori "package:@weborigami/gist(githubToken)/2d6e386378732c01110e2c61c3dadb76/data.json/message"
Hello, world!