Skip to content

anki-code/xontrib-clp

Repository files navigation

Copy output to clipboard. Cross-platform.

If you like the idea click ⭐ on the repo and tweet.

Installation

To install use pip:

xpip install xontrib-clp
# OR: xpip install -U git+https://github.com/anki-code/xontrib-clp

Usage

xontrib load clp
echo hello | clp   # Copy "hello\n" to clipboard

Use cases

$XONTRIB_CLP_ALIAS = 'pyperclip'  # default
xontrib load clp
echo hello | clp   # Copy "hello\n" to clipboard using pyperclip

shutil

$XONTRIB_CLP_ALIAS = 'shutil'
xontrib load clp
echo hello | clp   # Copy "hello\n" to clipboard using platform-depending tool: 
                   # pbcopy (Mac), xclip (Linux), clip.exe (Windows), etc

pst

If you need to paste the text and write to the file:

pst > /tmp/file
# Paste:
# <text>

cat /tmp/file
# <text>

Credits

This package was created with xontrib template.