Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wilhelm-murdoch/gost
A simple command line utility for easily creating Gists for Github.
https://github.com/wilhelm-murdoch/gost
Last synced: about 1 month ago
JSON representation
A simple command line utility for easily creating Gists for Github.
- Host: GitHub
- URL: https://github.com/wilhelm-murdoch/gost
- Owner: wilhelm-murdoch
- License: other
- Archived: true
- Created: 2013-08-25T09:38:39.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-11T14:29:50.000Z (almost 9 years ago)
- Last Synced: 2024-08-03T15:05:52.748Z (5 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 45
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Gost
***
Gost is a small command line utility written in Go. It is the result of me being frustrated (and lazy) with having to leave my terminal to create gists on Github.It does two things:
1. Uploads a specified file, contents of your clipboard, or piped input as a new Gist.
2. Returns the resulting URL.### Installation
You'll have to compile this on your own, so make sure you have the Go compiler installed on your machine. This utility was written with version `1.6` and should work with prior releases of Go.
1. Clone into your `$GOPATH/src` directory.
2. Fetch all external dependancies with `go get -v`
3. Navigate into the `$GOPATH/src/github.com/wilhelm-murdoch/gost` directory and run `go install`If all went well, the executable should now reside within `$GOPATH/bin`. If you want it available throughout your system, just add `$GOPATH/bin` to your systems' `$PATH`.
### Setup
Gost will create gists for you anonymously out of the box. However, if you want to pair your Github account with your gists, you'll first have to grab a personal API token from Github. You can get one of those [from here](https://github.com/settings/applications).Then, you will have to do one of the following:
1. Create an enviromental variable entitled `GOST` and assign your token to it. Gost will automatically find this variable and use it for your gists.
2. Use the `--token` flag every time you invoke gost from the command line. Otherwise, your gists will be anonymous and private by default.### Usage
You can find usage documentation with the following command:
```
$: gost --help
Gost - A simple command line utility for easily creating Gists for GithubUsage:
gost (--file= | --clip) [--name=] [--description=] [--token=] [--public]
gost (--help | --version)Options:
-t --token= Optional Github API authentication token. If excluded, your Gist will be created anonymously.
-f --file= Create a Gist from file.
-n --name= Optional name for your new Gist.
-d --description= Optional description for your new Gist.
-c --clip Create a Gist from the contents of your clipboard.
-p --public Make this Gist public [default: false].
-h --help Will display this help screen.
-v --version Displays the current version of Gost.
```### Examples
Create a private gist:
```
$: gost --file /path/to/by/file.txt
Gosting Gist ... Done!
Gist URL: https://gist.github.com/234234232
```Create a public gist:
```
$: gost --file /path/to/by/file.txt --public
Gosting Gist ... Done!
Gist URL: https://gist.github.com/234234232
```Create a public gist with a custom name and description:
```
$: gost --file /path/to/by/file.txt --public --name 'My Gosted Gist' --description 'This is quite handy!'
Gosting Gist ... Done!
Gist URL: https://gist.github.com/234234232
```Create a gist from the contents of your clipboard:
```
$: gost --clip
Gosting Gist ... Done!
Gist URL: https://gist.github.com/234234232
```Create a gist from command line stdin pipe:
```
$: date | gost
Gosting Gist ... Done!
Gist URL: https://gist.github.com/234234232
```