Skip to content
A Ruby script that allows posting of gists from the command-line of local files.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
.gitignore
.rubocop.yml
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
gistrb.gemspec

README.md

gistrb - A command-line utility to post files directly as Gists on GitHub.com

FOSSA Status

Description:

This is a utility to easily post local source files you have on GitHub Gists. It supports uploading multi-file Gists, authenticated Gists, anonymous Gists, and declaring the Gists as private or public. You can also attach descriptions to the Gist you post.

Usage:

gistrb [opts] source_file source_file2 ...

gistrb also supports input from STDIN. If gistrb is invoked with no files and nothing piped in, then it will wait on the terminal for input from STDIN until it reads an EOF character. An EOF character can be inserted on the terminal using Ctrl+D.

Any files in the Gist from STDIN will be labelled as "STDIN".

$ cat foo.txt | gistrb [opts] source_file # Reads foo.txt from piped STDIN and source_file as a file.
$ gistrb [opts] # Waits until it reads Ctrl+D and processes that data as STDIN

Options:

Option Description
-u | --user Post the Gist as currently signed in user
-s | --sign-in Sign into the utility using your GitHub account
--sign-out Sign out of the utility
-p | --public Post the Gist as public (it posts as private by default)
-d [DESC] | --description [DESC] Use [DESC] as the description for the Gist
-c | --clipboard Automatically put the created Gist URL into your clipboard (beta)
-n | --netrc Utilize .netrc file for storing/retrieving authorization token

Installation:

Using RubyGems, simply run this command: gem install gistrb

Requirements:

If on Linux, you need to have xclip installed for clipboard support

To install this on Ubuntu-based distributions, run the following command.

sudo apt-get install xclip

License

MIT License

Copyright © 2018 Cameron Roe

FOSSA Status

You can’t perform that action at this time.