Skip to content
/ clp Public

copy text from stdin(pipe, input) or from file to clipboard

License

Notifications You must be signed in to change notification settings

shabane/clp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

copy text from stdin(pipe, input) or from file to clipboard

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages