Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anki-code/xontrib-clp

Copy output to clipboard. Cross-platform.
https://github.com/anki-code/xontrib-clp

cli clipboard console cross-platform terminal xonsh xontrib

Last synced: about 2 months ago
JSON representation

Copy output to clipboard. Cross-platform.

Awesome Lists containing this project

README

        


Copy output to clipboard. Cross-platform.


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

## Installation

To install use pip:

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

## Usage

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

## Use cases

#### [pyperclip](https://pypi.org/project/pyperclip/)
```xsh
$XONTRIB_CLP_ALIAS = 'pyperclip' # default
xontrib load clp
echo hello | clp # Copy "hello\n" to clipboard using pyperclip
```

#### shutil
```xsh
$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:

```xsh
pst > /tmp/file
# Paste:
#

cat /tmp/file
#
```

## Credits

This package was created with [xontrib template](https://github.com/xonsh/xontrib-template).