Skip to content
Interact with GitHub Gist on Pharo
Smalltalk HTML
Branch: master
Clone or download
Latest commit f2d17e7 Aug 19, 2019

README.md

This is a work in progress. Due to the nature of the Gist API, the UX is (currently) 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.)


GistBrowser-Pharo

Interact with GitHub Gist on Pharo.

Browse, create, edit, and fork Gists via the Gist Browser, create Gists from Playgrounds, and more.

Screenshot

Screenshot

Installation

In a Playground, evaluate:

Metacello new
  repository: 'github://brackendev/GistBrowser-Pharo';
  baseline: 'GistBrowser';
  onConflict: [ :ex | ex useIncoming ];
  onUpgrade: [ :ex | ex useIncoming ];
  onDowngrade: [ :ex | ex useLoaded ];
  ignoreImage;
  load.

TODO

  • Pharo 8 compatibility
  • Move to Spec2

Example Usage

Note: In Pharo Settings, add Iceberg plain text credentials for github.com to avoid API rate limiting and to enable Gist creating, editing, forking, starring, etc.

Note: In Gist Browser, after entering text, it needs to be accepted with the "accept" keybind, usually Meta + s.

🔹 Open Gist Browser from Tools

  • Interact with Gists using the Gist Browser accessible via the Tools menu.

🔹 Open Gist Browser from a Playground

  • In a Playground, evaluate:

    "Open with the Iceberg plain text github.com username"
    GistBrowser open.
    "Open with a custom GitHub username"
    GistBrowser open: 'brackendev'.

🔹 Create a Gist from a Playground

  • 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.

    Screenshot

More Example Usage

Create a Gist

Gist Browser:

  1. Click the Add a new gist [] button (left-side top toolbar).
  2. In the File content text area, add the content.
  3. In the Gist description text field, add the description.
  4. In the Content filename text field, add the filename.
  5. Enable or disable the Privacy checkbox.
  6. Click the Save button.

Playground:

  1. Click the GitHub icon (top-right).
  2. In the Gist description text field, add the description.
  3. Click the Save button.

Delete a Gist

  1. Select the Gist (top-left column).
  2. Click the Delete Gist [] button (left-side top toolbar).

Add a File to a Gist

  1. Select the Gist.
  2. Click the Add a new file [] button (right-side top toolbar).
  3. In the File content text area, add the content.
  4. In the Content filename text field, add the filename.
  5. Click the Save button.

Edit a Gist File

  1. Select the Gist (top-left column)
  2. Select the file (top-right column).
  3. Edit the content (in the File content text area) and/or the filename (in the Content filename text field).
  4. Click the Save button.

Delete a Gist File

  1. Select the Gist (top-left column)
  2. Select the file (top-right column).
  3. Click the Delete File [] button (right-side top toolbar).

Acknowledgements

This project makes use of the following third-party libraries and utilities:

Author

brackendev

License

GistBrowser-Pharo is released under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.