用法
您可以按参数发送文件:$ drop defaults.cfg
http://hawo.net/~sijuhamm/d/NcT0jFb5.cfg
或通过stdin的任何内容:$ date | ./drop.py
http://hawo.net/~sijuhamm/d/ephtK9DY
远程位置的文件名实际上是文件的部分sha1校验和。校验和的长度可以在配置文件中设置。尽可能保留扩展名,也可以使用–extension参数覆盖扩展名。
完整的帮助信息如下:usage: drop [-h] [--destination DESTINATION] [--list-destinations]
[--preserve-name] [--extension EXTENSION] [--config-file CONFIG_FILE]
[--test] infile [infile ...]
Uploads data to a remote www directory via scp and returns a public url.
positional arguments:
infile File to upload. If multiple are passed, they will be
archived and compressed before uploading.
optional arguments:
-h, --help show this help message and exit
--destination DESTINATION, -d DESTINATION
Name of destination as found in configuration file.
--list-destinations, -l
List all destinations defined in configuration file.
--preserve-name, -p Will preserve original filename at remote location, by
adding an intermediate directory.
--extension EXTENSION, -e EXTENSION
Overwrites extension on uploaded file.
--config-file CONFIG_FILE, -c CONFIG_FILE
--test Runs a test on destination.