gister - publish gists from stdin and files
A command line application to create gists.
DEPRECATED: This version has been succeeded by scalene-net/gister.
Usage
$ gister < file.txt
$ gister -d "the gist description" -n "filename.txt "< file.txt
$ echo secret | gister
$ echo public | gister -p
$ gister script.py
$ gister script.js notes.txt
$ pbaste | gist # Copy from the clipboard - OSX Only
$ xsel | gist # Copy from the clipboard - X11 Only
$ gister -
the quick brown fox jumps over the lazy dog
^D
Installation
$ go install github.com/jswank/gister
Alternatively, run:
$ git clone https://github.com/jswank/gister
$ cd gister
$ make
$ sudo make install
An RPM can also be created:
$ make rpm
A binary, gister
and a manual page are created. This binary can be
installed on any compatible platform.
Authentication
gister
uses GitHub OAuth authentication. A token must be generated once and
then can be used for all your gister
needs. To generate an OAuth token, run:
$ curl -s -u github_username \
-d '{"scopes": ["gist"], "note": "commandline gister"}' \
https://api.github.com/authorizations
The token return value is your token. This token can be revoked anytime by
visting https://github.com/settings/applications
There are two ways to tell gister what token to use.
Set the key gist.token:
$ git config --global --add gist.token "my token"
$ gister example.txt
Specify the token as an environment variable:
$ export GIST_OAUTH="your oauth token"
$ gister example.txt
Security
By default, gister
performs validation on the SSL certificate presented by
https://api.github.com. If your system does not trust the CA certificate used
to sign the certificate presented, then the CA certificate should be added.
Alternatively, the -i
option can be specified to disable SSL certificate
verification.
Defaults
You can set whether gists are public by using git-config(1) to control
the behavior.
- gist.private - boolean (true or false) - Determines whether to make a gist public
by default. If set, then the
--public
option has no effect.
Manual
A manual page is available as gister.txt
; a *NIX manual page is created using this
as a source file as part of the Makefile
.
License
This program and the accompanying materials are made available under the
terms of the MIT license.