魅族MX5联通版破解移动4G/3G | TD-
543 2023-04-03 05:22:14
PyPicGo 是一款图床工具,是PicGo是Python版实现,并支持各种插件自定义插件,目前PyPicGo自带了gitee、github、SM.MS和七牛云图传,以及rename、notify和typora等插件,并支持从pypi中下载其他插件和Uploader
源码地址:
【gitee】https://gitee.com/Ranger313/pypicgo
【github】https://github.com/AnsGoo/PyPicGo
pip install pypicgo
配置文件位于/$HOME/.PyPicGo/config.yml
目录下,采用YAML
的方式进行配置。必须配置上传器uploader
,插件plugins
的数量可选
default:
# 默认配置
uploader: gitee
# 默认图床
plugins:
# 全局插件
-
module: pypicgo.plugins.rename.ReNamePlugin
# 图床插件加载地址
config:
format
: liunx{
hash
}chenghaiwen{date}
-
{filename}
-
module: pypicgo.plugins.typora.TyporaPlugin
-
module: pypicgo.plugins.compress.CompressPlugin
-
module: pypicgo.plugins.notify.NotifyPlugin
uploaders:
# 可用图床
smms:
# sm.ms图床配置
module: pypicgo.uploaders.smms.uploader.SmmsUploader
config:
secret_token: xxx
gitee:
# gitee 图床配置
module: pypicgo.uploaders.gitee.uploader.GiteeUploader
config:
domain: https:
/
/
gitee.com
owner: xxx
repo: xxx
img_path: xxx
access_token: xxx
plugins:
github:
# github图床配置
module: pypicgo.uploaders.github.uploader.GithubUploader
config:
domain: https:
/
/
api.github.com
owner: xxx
repo: xxx
img_path: xxx
oauth_token: xxx
plugins:
# github 图床私有插件
-
module: pypicgo.plugins.jsdelivr.JsDelivrPlugin
qiniu:
#七牛云图床配置
moduele: pypicgo.uploaders.qiniu.uploader.QiNiuUploader
config:
domain: http:
/
/
demo.pypicho.com
/
bucket_name: pypicgo
apis:
-
http:
/
/
up
-
z1.qiniup.com
access_key: xxx
secret_key: xxxx
帮助信息
?1pypicgo
-
h
上传文件
?1pypicgo
-
f picture1 picture2 ...
指定上传图床
?1pypicgo
-
n github
-
f picture1 picture2 ...
如果系统找不到pypicgo
,请检查python
的Scripts
文件夹是否被加入Path
环境变量
uploader
是具体的上传插件,用户需要继承pypicgo.core.base.uploader.CommonUploader
并实现upload
方法,然后在配置文件中引用即可.
PyPicgo
支持的插件分为三种before
、after
和final
如果想自定义插件只要根据要求继承任意一个基类插件,并实现execute方法,并在config.yml
中配置即可使用.
git clone git@github.com:AnsGoo
/
PyPicGo.git
cd pypicgo
pipenv shell
pipenv install
python run.py
-
n 图床名
-
f img1.webp img2.webp
到此这篇关于 利用Python实现Picgo图床工具的文章就介绍到这了,更多相关Python实现Picgo图床工具内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
您可能感兴趣的文章: