Skip to main content

Pygmentize to clipboard for macOS.

Project description

https://travis-ci.org/brymck/pygclip.svg?branch=master

pygmentize to clipboard for macOS

This utility package is designed to send code through pygmentize and save it as rich HTML in your macOS clipboard. It can then be pasted easily into anything that accepts styled HTML input, such as Evernote, OneNote, Gmail, etc.

https://github.com/brymck/pygclip/raw/master/assets/screenshot.png

Usage

pygclip offers a couple ways to retrieve code for passing on to pygmentize:

  • From a file
  • Via the standard input
  • Pulling it from your clipboard

Examples below:

File

$ cat path/to/file.py
def foo():
    return 'bar'
$ pygclip -s monokai -l python path/to/file.py

Standard input

$ pygclip -s monokai -l python
def foo():
    bar()

Clipboard

$ echo "def foo():\n    return 'bar'" | pbcopy
$ pygclip -s monokai -l python -c

Project details


Download files

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

Files for pygclip, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size pygclip-0.0.8-py2.py3-none-any.whl (7.3 kB) File type Wheel Python version 3.6 Upload date Hashes View
Filename, size pygclip-0.0.8.tar.gz (88.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page