PYSMMS
基于 sm.ms 图床的命令行工具,sm.ms 文档见此链接。
借鉴 n0vad3v/smv2,在其基础上添加了上传成功后自动拷贝图片链接到剪贴板,多账号随机上传等功能。
最新版已支持使用 github + jsdelivr 实现文件加速。
安装
python3 -m pip install -U pysmms
使用
查看帮助
➜ ~ pysmms help
pysmms {arg}
profile 查看用户资料(需要配置 Authorization)
ip_history 基于 IP 的临时上传历史记录
history 获取用户上传记录(需要配置 Authorization)
gh /path/to/picture 使用 GitHub 作为图床上传
/path/to/picture 上传图片
上传图片不强制配置 Authorization,但不保证图片的使用时效。
支持格式:.jpeg, .jpg, .png, .gif, .bmp
配置 Authorization 需要在用户根目录创建 .pysmms 文件,文件写入以下内容:
[sm.ms]
auth=['wKSlYH******z8eb8qSr']
注意:auth 以列表存放,支持多个 auth 随机上传。
===============================================================
GitHub 配置如下:
[github]
user=<用户名>
repo=<仓库名>
branch=<分支>
token=<Personal access tokens>
上传图片
pysmms /path/to/picture
上传图片不强制需要 Authorization,但无 Authorization 的图片不保证时效。
例如:
查看用户资料
pysmms profile
查询临时上传历史
pysmms ip_history
此历史记录基于 IP,不需要配置 Authorization。
查询用户上传历史记录
pysmms history
此历史记录需要配置 Authorization,只可查询最近五条数据。
Metadata
Release files for pysmms 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pysmms-0.1.5.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pysmms-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.6 kB
Release files / pysmms-0.1.5.tar.gz
| Download URL | pysmms-0.1.5.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ce9776b3b9eceac8ded2210f61e355feddb26eb3693d868a00058a93c38c7ed
|
|
BLAKE2b-256 checksum How to use checksums |
3ad6ae68c4ff8c0c77599e6533e12a250a6aab8cbb56937fd1d98316eaa4e1b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0
|
Release files / pysmms-0.1.5-py3-none-any.whl
| Download URL | pysmms-0.1.5-py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08493fb13c5a2d94b47454aee7ed6df60c3b288b223dd12a66b89f7d5cef5a67
|
|
BLAKE2b-256 checksum How to use checksums |
ec23dca02a81c600507d6381c506481388885e20a2d66a8ccc7a2c0c070da179
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.0
|