鳄梨酱命令行界面

guacamole-cli的Python项目详细描述


用于https://github.com/Antojitos/guacamole

的命令行接口

使用Python2.7和3.4进行测试

https://travis-ci.org/Antojitos/guacamole-cli.svg?branch=master

安装

$ 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

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

推荐PyPI第三方库


热门话题
java Clojure关键字在内存中的大小是多少?   Java中有固定长度的通用数组对象吗?   PostgreSQL:通过Java更新我的用户表   错误:使用java解析xml   java Json显示列表中对象的名称   java比较JodaTime时区   与JAVA中的API和包的区别?   java的int值在for循环中不改变   谷歌应用引擎中的java RSA   迁移到spring 5后出现java非法字符错误   java Websphere管理控制台不工作   JavaGSON如何始终在json中包含毫秒?   带有空格和双引号的windows Java ProcessBuilder命令参数失败   java错误:重复的zip条目[43.jar:org/apache/http/annotation/NotThreadSafe.class]