鳄梨酱命令行界面
guacamole-cli的Python项目详细描述
用于https://github.com/Antojitos/guacamole
的命令行接口使用Python2.7和3.4进行测试
安装
$ pip install guacamole-cli
用法
上传文件
要上载文件,需要指定鳄梨酱服务器的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