用于在https://sm.ms上管理图像的命令行工具包

smms.p的Python项目详细描述


smms.py

简介

python包smms.py是用于在https://sm.ms管理图像的命令行工具包。它提供简单快捷的实用程序,供您上传、删除和搜索个人图像。

用法

安装

只需使用一行命令pip install smms.py安装即可。

删除

https://sm.ms中删除图像有点令人沮丧。但是由于官方的api,我们可以从服务器上删除图像。

smms delete --help
# Usage: smms d [OPTIONS] [FILENAMES]...#   delete images from remote server & clean local history# Options:#   -c, --comment TEXT  wildcard statement for matching commentations#   -d, --date TEXT     one or more date strings like "yyyy-mm-dd" to specify#                       search scope#   -y, --yes           delete without confirmation#   --help              Show this message and exit.
smms delete "*t*" -d 2001-01-01
# Delete all images with a letter "t" in filename uploaded on 2001-01-01

您可以使用filenamecomment&;date缩小范围。出于安全考虑,您还需要确认删除。

上传

使用smms.py时,将图像上载到https://sm.ms非常简单。例如:

smms upload --help
# Usage: smms upload [OPTIONS] FILENAME#   upload images & insert new records into local history# Options:#   -c, --comment TEXT  commentation string for images#   --help              Show this message and exit.
smms upload $HOME/images/*.jpg -c 'example upload'# upload all jpg-format images in ~/images/ and comment them

搜索

命令search允许您搜索和查看本地历史记录。又一个例子:

smms search --help
# Usage: smms s [OPTIONS] [FILENAMES]...#   search for matched records in local history# Options:#   -c, --comment TEXT  wildcard statement for matching commentations#   -d, --date TEXT     one or more date strings like "yyyy-mm-dd" to specify#                       search scope#   --help              Show this message and exit.
smms search "*.jpg" -c "*backup*"# Search for all jpg-format images commented with 'backup'

迁移

smms migrate --help
# Usage: smms migrate [OPTIONS]#   migrate local history from version 0.0.2 to 1.0.0# Options:#   --help  Show this message and exit.

帮助迁移旧版本的本地历史记录。

更改日志

  • 版本1.0.0
    项目重构,默认注释字符串已从'--- NO COMMENT ---'更改为''
  • 版本0.0.1
    在Windows平台下修复颜色问题
  • 版本0.0.0
    初始版本

关于

如果您有任何建议,请发邮件给我,地址是queensferry.me@gmail.com。我们也欢迎您的请求。

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

推荐PyPI第三方库


热门话题
hbm中的java异常。xml   java如何扩展JavaDoc5.0标准doclet?   java将所有非字母数字更改为+   java如何使用JSP从URL获取参数   把java学校的程序员变成C或C++程序员有多难?   java使用HTML获取表内容   java在JPanel中使用repaint()方法而不删除已绘制的内容   rest如何在Java中动态映射同一父类的子对象列表   如果协议不是http或https,java如何解析URL?   java删除文本时如何在eclipse中隐藏建议框?   java代码名1 GPS跟踪器   java寻找骑士所有独特的可能动作   从一个管道到另一个进程的java InputStream仍然被阻塞   java在阶段后将子项添加到窗格。show()   java如何确保在子对象中调用超级方法?   java从json对象获取值   java使用多线程读取文件   java Struts 1.1+Hibernate 3.2集成