Skip to content

Latest commit

 

History

History
127 lines (81 loc) · 2.26 KB

readme.md

File metadata and controls

127 lines (81 loc) · 2.26 KB

clp

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.

tabebl of content

features

  1. you can pipe any text base result of a program.
  2. you can pass a bunch of file paths to copy their content to clipboard.
  3. you can pass any text
  4. you can run program without any switchs and agrs, this will copy your text from the prompt.

usage

  • 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.

examples

  1. pipe
    $ ls /var | clp 
  1. from file
    $ clp -i /var/log/syslog
  1. pass texts
    $ clp this text will copy to clipboard as well as other way
    
    # warning: no input was given, consider args as input text
  1. prompt
    $ clp

preview

from input file input

pipe result to clp pipe

type a text and then copy it to clipboard promt

consider args as text to copy arg

installation

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

license

  • GPL
  • work on my machine