Skip to content

Commit 2cfff04

Browse files
committed
update doc
1 parent f10009a commit 2cfff04

File tree

5 files changed

+39
-2
lines changed

5 files changed

+39
-2
lines changed

docs/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
更新日志
55
=========
66

7+
v1.16.0
8+
--------
9+
10+
Released in 2023-1-6
11+
12+
- 优化:upimg_stream_processor钩子支持返回 `suffix` 字段指定新后缀。
13+
- 新增:jpg/png转换为webp内置扩展,默认禁用。
14+
715
v1.15.0
816
--------
917

docs/faq.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,10 @@ v1.13.0支持,进入beta,可由后台开启。
8080
数据库,而是内存型,所以是有风险的,一定要开启AOF。
8181

8282
所以备份数据就是备份redis的库,请使用redis相关工具定时导出库中数据即可备份。
83+
84+
9. 添加第三方钩子时提示模块未发现
85+
-----------------------------------
86+
87+
管理员后台安装第三方包后,需要添加第三方钩子方能加载,但发现提交时提示未发现模块。
88+
89+
目前发现此问题,尚不确认原因,如需加载,请重载或重启 `Sapic` 应用。

docs/hook.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@
108108
- sendmail
109109
通过3种方式发送邮件
110110

111+
.. versionadded:: 1.16.0
112+
113+
- pic2webp
114+
将JPG/PNG图片转为webp格式
115+
111116
.. _picbed-third-hook:
112117

113118
2. 第三方钩子
@@ -221,7 +226,7 @@ upimg_stream_processor 🍇
221226

222227
.. code-block:: python
223228
224-
dict(code=0, data=dict(stream="新的图片二进制内容"))
229+
dict(code=0, data=dict(stream="新的图片二进制内容", suffix="可选,指定新后缀"))
225230
226231
注意:钩子可以替换原图,多个钩子的处理会累加(处理优先级是按照钩子名排序)。
227232

docs/install.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,17 @@ NO.5 程序升级
390390
`staugur/picbed-up2cos <https://github.com/sapicd/up2cos>`_ 、
391391
`staugur/picbed-up2oss <https://github.com/sapicd/up2oss>`_
392392

393+
- v1.16.0
394+
- 增加了内置模块`pic2webp`,可以手动安装:
395+
396+
.. code-block:: bash
397+
398+
$ pip install -r requirements/pic2webp.txt
399+
400+
或通过命令行自动完成:
401+
402+
.. code-block:: bash
403+
404+
$ cd picbed/src
405+
$ flask sa upgrade --yes 1.16
406+

src/utils/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def clean(hookloadtime, hookthirds, invalidkey):
139139

140140
@sa_cli.command()
141141
@click.confirmation_option(prompt="确定要升级更新吗?")
142-
@click.argument("v2v", type=click.Choice(["1.6-1.7", "1.7-1.8"]))
142+
@click.argument("v2v", type=click.Choice(["1.6-1.7", "1.7-1.8", "1.16"]))
143143
def upgrade(v2v):
144144
"""版本升级助手"""
145145
#: 处理更新版本时数据迁移、数据结构变更、其他修改
@@ -211,3 +211,6 @@ def upgrade(v2v):
211211
pipe.delete(rsp("image", sha))
212212
pipe.delete(dk)
213213
pipe.execute()
214+
215+
elif v2v == "1.16":
216+
_pip_install("pillow>=9.4.0")

0 commit comments

Comments
 (0)