sometimes we need to copy result of some program to clipboard. or we need to copy a text file to clipboard. this simple program will help you on that.
- you can pipe any text base result of a program.
- you can pass a bunch of file paths to copy their content to clipboard.
- you can pass any text
- you can run program without any switchs and agrs, this will copy your text from the prompt.
- to see the help enter
clp -h
DESCRIOTOON
copy stdin or file content to clipboard.
in order to copy the resutl of one program to clipboard you should
pipe the result to clp.
if you do not use switches, the stdin will copy to clipboard
OPTIONS
-h, --help
display this help and exit.
-i, --input-file
read the path file and copy the file content to clipboard.
- pipe
$ ls /var | clp
- from file
$ clp -i /var/log/syslog
- pass texts
$ clp this text will copy to clipboard as well as other way
# warning: no input was given, consider args as input text
- prompt
$ clp
install dependencies
$ pip3 install pyperclip
# if you dont have the pip3, install it first.
download the program
$ cd /tmp && wget 'https://raw.githubusercontent.com/shabane/clp/master/clp.py'
add the clp to user programs
$ cp clp.py ~/.local/bin/clp
add execute permission to clp
$ chmod +x ~/.local/bin/clp
test the installation
$ clp -h
- GPL
- work on my machine