Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

A small utility for making gists

Project description

mkgist

A small utility for making gists. When I need to share code snippets online, the formatting always ends up totally messed up when I copy-paste manually. This alleviates that.

Setup

With pip

The easiest way to get a copy is through pip:

pip install mkgist

Note that it depending on your installation, you might need to use pip3.

Manual

To install dependencies, run pip install -r requirements.txt after installing. I don't use this within a virtual environment, but doing so would look something like this:

virtualenv -p $(which python3) $HOME/virtualenv/mkgist
source $HOME/virtualenv/mkgist/bin/activate

Usage

mkgist filenames [-d "description"] [--public] [--raw] [--nocopy]
  • If no filenames are entered, the contents of the gist are read from STDIN.
  • The location of the created gist is printed to stdout.
  • Gists are secret by default, but can be made public with --public. (Secret gists aren't indexed by search engines)
  • --raw returns a link to the raw hosted file, which you can then get with curl or wget. If multiple files are created with this flag, the URLs are always printed to stdout.
  • By default, the URL of the created Gist is copied to the clipboard. --nocopy prints the link to stdout instead, not overwriting the clipboard.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mkgist-3.3-py3-none-any.whl (3.8 kB) Copy SHA256 hash SHA256 Wheel py3 Jul 22, 2018
mkgist-3.3.tar.gz (3.4 kB) Copy SHA256 hash SHA256 Source None Jul 22, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page