Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/anki-code/xontrib-clp
- Owner: anki-code
- License: mit
- Created: 2023-01-31T17:59:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T10:58:31.000Z (5 months ago)
- Last Synced: 2024-10-12T15:56:38.124Z (2 months ago)
- Topics: cli, clipboard, console, cross-platform, terminal, xonsh, xontrib
- Language: Python
- Homepage: https://github.com/anki-code/xontrib-clp
- Size: 86.9 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xontribs - clp - Copy output to clipboard. Cross-platform. (Plugins / Prompt tweaks)
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).