Skip to main content

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

For general use, it's a good idea to keep it somewhere in your path. Because the endpoint requires authentication, you should create a JSON file with your credentials called .mkgist.conf at the home directory. For example,

{
  "username": "user",
  "password": "password"
}

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.

Release files for mkgist 2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkgist 2.0
File Size Uploaded
mkgist-2.0.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkgist 2.0
File Interpreter ABI Platform
mkgist-2.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / mkgist-2.0.tar.gz

Download URL mkgist-2.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1a7be48324be389277f4f000fc98cf7351c25c55f547f4ecbe23b87d17fa8dda
BLAKE2b-256 checksum
How to use checksums
ad1c07c5fd9826b3ca33d129674f324fd8ba47046f4b7ba01f9dfa24a4a6c252
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mkgist-2.0-py3-none-any.whl

Download URL mkgist-2.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
668090ec28e982b46cb567edb03dd55dd9671d9377f86b88c68dce236aa5c9ce
BLAKE2b-256 checksum
How to use checksums
b43776adeb80d9ba3010a1fb9e3dfeaab72a77b2cfd852b090ea86d2daa013f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.5

2 release files

3.4

2 release files

3.3

2 release files

3.2

2 release files

3.1

2 release files

3.0

2 release files

2.1

2 release files

This release

2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page