You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pygclip

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pygclip

Pygmentize to clipboard for macOS.

0.0.8
pipPyPI
Maintainers
1

####### pygclip #######

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

:code:pygmentize to clipboard for macOS

This utility package is designed to send code through :code: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.

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

Usage

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

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

Examples below:

File

.. code-block:: bash

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

Standard input

.. code-block:: bash

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

Clipboard

.. code-block:: bash

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts