类似于cat但通过xmpp发送输出的cli应用程序
xmppcat的Python项目详细描述
一个unix命令行程序,工作方式类似于cat,但通过xmpp发送其输出。
帮助
usage: xmppcat [-h] [-V] [-c CONFIG] [-H HOST] [-P PORT] [-u USER] [-p PWD] [-q] [-d] [-v] recipient [file] CLI application that works like cat but sends its output through xmpp positional arguments: recipient The XMPP jid to send the message to file The file to read. If not specified it will be read from STDIN optional arguments: -h, --help show this help message and exit -V, --version show program's version number and exit -c CONFIG, --config CONFIG Use a different configuration file -H HOST, --host HOST XMPP host (xmppcat will try to auto detect it with DNS or JID parsing) -P PORT, --port PORT XMPP port -u USER, --user USER XMPP username (JID) -p PWD, --pass PWD XMPP password output arguments: -q, --quiet Suppress any non-error output -d, --debug Enable debugging output -v, --verbose Show additional connection informations
配置文件
程序需要指定几个参数才能连接到xmpp服务器并进行身份验证。 要简化此过程,可以将此选项保存在配置文件中,可以全局保存在/etc/xmppcat.conf中,也可以本地保存在$home/.xmppcat.conf中。
这是xmppcat的配置文件示例:
[DEFAULT] user = myuser@jabber.org/xmppcat pass = mypassword host = jabber.org # can be autodetected by dnspython port = 5222 # also autodetectable
示例用法
echo "Hello world!" | xmppcat recipient@jabber.org xmppcat recipient@jabber.org file.txt
许可证
版权所有(c)2012 Massimiliano Torromeo
xmppcat是根据bsd许可条款发布的免费软件。
有关详细信息,请参阅源发行版附带的许可证文件。
联系人
- 马西米利亚诺·托罗米奥massimiliano.torromeo@gmail.com>;