命令行剪贴板实用程序和代码段目录

snipco的Python项目详细描述


将保存的寄存器、文件或stdin的内容复制到剪贴板,或 操纵注册表。在

安装它

要从pypi安装:

pip install snipco

从来源来看,有两种方法:

  • 如果您有make,请运行:

    ^{pr2}$ 在
  • 否则,运行:

    ./setup.py install --user
    

使用

snipco [-h] [-g [name_or_path]] [-s [name]] [-x [name]] [-l]
       [-p [name]] [-f [path]] [-t [text]] [-v]
snipco [-h] [-g [name_or_path]] [-s [name]] [-x [name]] [-l]
       [-p [name]] [-f [path]] [-v]

要获得命令行帮助,只需运行:

snipco --help

参数

所有参数都是可选的;如果没有提供参数,则snipco将复制 stdin到剪贴板。如果-file或-text是给定的唯一参数,则 文件或引用的文本将分别复制到剪贴板。在

-h, –helpshow help and exit
-g [name_or_path], –get [name_or_path]Copy the contents of the saved register. The named key must exist.
-s [register_name], –set [register_name]Save the input to a named register. Uses stdin as input unless either –file or –text is specified.
-f [path], –file [path]Specify a file to use instead of stdin for –set. If no other arguments are supplied, copies the contents of the given file directly to the clipboard.
-t “text to save”, –text “text to save”Specify quote-delimited text on the command-line instead of stdin. If no other arguments are supplied, copies the text directly to the clipboard.
-l, –listList the existing registers
-p [name], –print [name]Print the contents of the named register. The registry key must exist.
-x [register_name], –unset [register_name]Unset the named register.
-v, –versionshow program’s version number and exit

示例

将文件中的文本直接保存到剪贴板:

snipco --file path/to/file.txt

或者:

cat path/to/file.txt | snipco

将文本保存到命名寄存器:

snipco --set myregister --text "Hello, world!"

将文本从注册表复制到剪贴板:

snipco --get myregister

将寄存器中的文本打印到标准输出:

snipco --print myregister

取消设置寄存器:

snipco --unset myregister

列出已保存的寄存器:

snipco --list

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Grid loadmask(true)在gxt中不起作用   java将字符串索引转换为整数   为什么Java泛型适用于基元数组,但不适用于基元数组?   java如何让Azure应用程序服务Tomcat将所有80/443流量转发到运行在同一应用程序服务上的JBoss   具有多个值的java转换映射到树?   java如何设置SQL server连接URL?   java设置了多个相互独立的JFrame   安全性在JAVA中如何使用RSAPrivateKey的密码短语?   java不能使用比Apache Velocity中更大的条件   如何在Java中打印字符串的所有排列   停止Android Studio自动导入java。sql。日期   对象简单计算器程序java   java如何在安卓中使用“&”符号作为字符串?   java Connect,为我的安卓应用程序从REST API发布和获取数据