Interact with GitHub Gist on Pharo.
Browse, create, edit, and fork Gists via the Gist Browser, create Gists from Playgrounds, Gist Press support, and more.
- Pharo 8 reference platform.
- Support the latest Pharo release.
- Support Spec2.
-
Setup a personal access token for Pharo at https://github.com/settings/tokens/new. Use this token for the Iceberg github.com plain text credentials password.
-
In a Playground, Do it:
Metacello new
repository: 'github://brackendev/GistBrowser-Pharo/src';
baseline: 'GistBrowser';
load.
Note: In Gist Browser, after entering text, it needs to be accepted with the "accept" keybind, usually Meta + s.
- Interact with Gists using the Gist Browser accessible via the Tools menu.
In a Playground, Do it:
"Open with the Iceberg plain text github.com username"
GistBrowser open.
...or Do it:
"Open with a custom GitHub username"
GistBrowser open: 'brackendev'.
-
Similar to the Playground "Remote publish" (to share code via Shared Smalltalk Workspaces), create a Gist from a Playground via the GitHub button in the Playground toolbar.
Gist Browser:
- Click the Add a new gist [➕] button (left-side top toolbar).
- In the File content text area, add the content.
- In the Gist description text field, add the description.
- In the Content filename text field, add the filename.
- Enable or disable the Privacy checkbox.
- Click the Save button.
Playground:
- Click the GitHub icon (top-right).
- In the Gist description text field, add the description.
- Click the Save button.
- Select the Gist (top-left column).
- Click the Delete Gist [❌] button (left-side top toolbar).
- Select the Gist.
- Click the Add a new file [➕] button (right-side top toolbar).
- In the File content text area, add the content.
- In the Content filename text field, add the filename.
- Click the Save button.
- Select the Gist (top-left column)
- Select the file (top-right column).
- Edit the content (in the File content text area) and/or the filename (in the Content filename text field).
- Click the Save button.
- Select the Gist (top-left column)
- Select the file (top-right column).
- Click the Delete File [❌] button (right-side top toolbar).
- Due to limitations of the public Gist API, the UX is not as smooth as I prefer. Multiple API requests have to be made to get the entire content of a Gist. Even getting the starred status of a Gist requires a unique API request.
This project makes use of the following third-party libraries and utilities:
Bracken Spencer
GistBrowser-Pharo is released under the MIT license. See the LICENSE file for more info.