鳄梨酱命令行界面
项目描述
https://github.com/Antojitos/guacamole的命令行界面
使用 Python 2.7 和 3.4 测试
安装
$ pip install guacamole-cli
用法
上传文件
要上传文件,您需要指定 Guacamole 服务器 URL 和文件名,例如:
$ guacamole screenshot.jpg http://guacamole.antojitos.io/files/TRPm/0lkq/6egk/yHgg/OeDg/fVHr/screenshot.jpg
命令选项
使用--help显示命令选项:
$ guacamole --help usage: guacamole [-h] [-c CONFIG_FILE] [-e ENDPOINT] [-s SHORTENER] filename positional arguments: filename file to upload optional arguments: -h, --help show this help message and exit -c CONFIG_FILE, --config-file CONFIG_FILE Specify a configuration file -e ENDPOINT, --endpoint ENDPOINT Guacamole endpoint URL -s SHORTENER, --shortener SHORTENER Tamales endpoint URL
配置文件
默认情况下,命令行界面在 ~/.guacamole.conf中查找配置文件。您还可以使用--config-file命令行选项指定替代配置文件。
这是一个例子:
[general] endpoint = http://guacamole.antojitos.io/files/ # an empty value disable the URL shortener service shortener = http://t.antojitos.io/api/v1/urls
测试
为了执行测试套件,您需要运行以下命令:
pip install -r requirements-dev.txt python tests/main.py