Skip to main content

The CLI Tool for SM.MS, based on API v2.

Project description

SMv2

基于 SM.MS 图床 API v2 的小程序。

安装方法

先安装我啦~

$ pip3 install smv2

使用方法

直接使用:

$ smv2 /path/to/image

例如:

 smv2 poster36.jpg 
Upload without Token.
┌SM.MS Upload Status───────────────────────────────────────────────┐
│ Status        True                                              │
├──────────────┼───────────────────────────────────────────────────┤
│ Image URL     https://i.loli.net/2019/08/04/slU3yuD1cr9hSNQ.jpg │
├──────────────┼───────────────────────────────────────────────────┤
│ Deletion URL  https://sm.ms/delete/YDNzFTn1A4X3QORb9JCieM2ohs   │
└──────────────┴───────────────────────────────────────────────────┘

若有 API Token,则可以在 ~/.smms 文件中以如下形式写入后使用:

[sm.ms]
api_token=<Enter Your Token Here>

此时上传的文件就可以在 sm.ms 后台看到了,例如:

➜ smv2 potw1144a.jpg 
Upload with Token:1A0G******IhBV
┌SM.MS Upload Status───────────────────────────────────────────────┐
│ Status       │ True                                              │
├──────────────┼───────────────────────────────────────────────────┤
│ Image URL    │ https://i.loli.net/2019/08/04/pgTkdFXm2IsORBx.jpg │
├──────────────┼───────────────────────────────────────────────────┤
│ Deletion URL │ https://sm.ms/delete/M8PCZ6fuW1br2qlswKyiTHRBUh   │
└──────────────┴───────────────────────────────────────────────────┘

TODOs

  • 支持基于 API Token 的图片上传
  • 获得用户历史上传记录

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smv2-0.0.3.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

smv2-0.0.3-py3-none-any.whl (16.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page