Skip to content

Commit d6b1819

Browse files
committed
fix(app): modify details and documents
- 修复 可能的程序关闭后线程未退出问题 - 修复 可能的登录状态持久化问题 - 完善 README 文档 - 完善 GitHub Actions 步骤 - 微调 前端样式 - 移除 Rate Limit 和 Cache 拓展
1 parent 1ba96cb commit d6b1819

File tree

11 files changed

+43
-223
lines changed

11 files changed

+43
-223
lines changed

.github/workflows/pkg.yml

+14-15
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,22 @@ jobs:
2929
runs-on: ${{ matrix.os }}
3030
strategy:
3131
matrix:
32-
# os: [windows-2019, windows-2019, macos-10.15, ubuntu-18.04]
3332
include:
34-
- os: windows-2019
33+
- os: windows-2022
3534
version: win_x64
3635
pythonArch: 'x64'
37-
- os: windows-2019
36+
- os: windows-2022
3837
version: win_x86
3938
pythonArch: 'x86'
40-
- os: macos-10.15
39+
- os: macos-11
4140
version: mac
4241
pythonArch: 'x64'
43-
- os: ubuntu-18.04
42+
- os: ubuntu-20.04
4443
version: ubuntu_x64
4544
pythonArch: 'x64'
4645

4746
steps:
48-
- uses: actions/checkout@v2
47+
- uses: actions/checkout@v3
4948

5049
- name: Classify files, prepare to be packaged
5150
run: |
@@ -59,10 +58,10 @@ jobs:
5958
cp ./LICENSE ./.pkg/public/
6059
cp ./README.md ./.pkg/public/
6160
62-
- name: Setup Python 3.7
63-
uses: actions/setup-python@v2.2.2
61+
- name: Setup Python
62+
uses: actions/setup-python@v4
6463
with:
65-
python-version: 3.7
64+
python-version: 3.8
6665
architecture: ${{ matrix.pythonArch }}
6766

6867
- name: Install Requirements
@@ -76,21 +75,21 @@ jobs:
7675
python ./py-pkger.py auto
7776
7877
- name: Compress to ZIP (win)
79-
if: ${{ matrix.os == 'windows-2019' }}
78+
if: ${{ matrix.version == 'win_x64' || matrix.version == 'win_x86' }}
8079
run: |
8180
cd ./.pkg/dist/
8281
mv ./main.exe ./PixivBiu.exe
8382
Compress-Archive * ../../${{ matrix.version }}.zip
8483
85-
- name: Compress to ZIP (mac)
86-
if: ${{ matrix.os == 'macos-10.15' || matrix.os == 'ubuntu-18.04' }}
84+
- name: Compress to ZIP (unix-like)
85+
if: ${{ matrix.version == 'mac' || matrix.version == 'ubuntu_x64' }}
8786
run: |
8887
cd ./.pkg/dist/
8988
mv ./main ./PixivBiu
9089
zip -r ../../${{ matrix.version }}.zip *
9190
9291
- name: Upload to Artifact
93-
uses: actions/upload-artifact@v2
92+
uses: actions/upload-artifact@v3
9493
with:
9594
name: pixivbiuArt
9695
path: ./${{ matrix.version }}.zip
@@ -99,10 +98,10 @@ jobs:
9998
needs: [build-on-platform]
10099
runs-on: ubuntu-20.04
101100
steps:
102-
- uses: actions/checkout@v2
101+
- uses: actions/checkout@v3
103102

104103
- name: Download from Artifact
105-
uses: actions/download-artifact@v2
104+
uses: actions/download-artifact@v3
106105
with:
107106
name: pixivbiuArt
108107

README.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ PixivBiu 是一款不错的 Pixiv **辅助**工具。
1010
* Pixiv 搜索,可免会员按收藏数、人气、日期排序
1111
* 下载原始图片,包括插画、漫画、动图
1212
* 多种下载模式,单、多线程模式以及 aria2 支持
13-
* 筛选图片的宽高、宽高比、类型、时间、标签等
1413
* 获取用户的作品、收藏夹、关注列表、推荐等
15-
* 获取排行榜,包括今日、本周、本月、指定日期等
16-
* 收藏作品、关注等
14+
* 筛选图片的宽高、类型、标签等
1715

1816
## 使用
1917

2018
### 源码
2119

2220
* 安装依赖,执行 `pip install -r requirements.txt`
2321
+ [Flask](https://github.com/pallets/flask)[requests](https://github.com/psf/requests)[PyYAML](https://github.com/yaml/pyyaml)[Pillow](https://github.com/python-pillow/Pillow)[PixivPy](https://github.com/upbit/pixivpy)[PySocks](https://github.com/Anorov/PySocks)
24-
* 修改 `./config.yml` 相关配置选项,具体可参考[默认配置文件](./app/config/biu_default.yml)
22+
* 修改 `./config.yml` 相关配置项,具体可参考[默认配置文件](./app/config/biu_default.yml)
2523
* 执行 `python main.py`
2624
* 访问运行地址,默认为 `http://127.0.0.1:4001/`
2725

@@ -37,10 +35,6 @@ PixivBiu 是一款不错的 Pixiv **辅助**工具。
3735

3836
- [Docker_Buildx_PixivBiu](https://github.com/zzcabc/Docker_Buildx_PixivBiu) by [zzcabc](https://github.com/zzcabc)
3937

40-
## 文档
41-
42-
目前已有**使用、API**类文档,如有需要请访问[这里](https://biu.tls.moe/)
43-
4438
## 贡献维护
4539

4640
如果你想参与此项目的开发,欢迎查看[开发文档](https://biu.tls.moe/#/develop/quickin)

README_EN.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ PixivBiu is a nice Pixiv **assistant** tool.
1010
* Pixiv searching, sort by favorites, popularity and date without membership
1111
* Download original images, including illustrations, comics and motion pictures
1212
* Multiple download modes, single and multi-threaded mode and aria2 support
13-
* Filter image width, height, scale, type, time and tags
14-
* Get user's works, favorites, followers, recommendations
15-
* Get rankings, including today, week, month, and specific date
16-
* Favorite works and followers
13+
* Get user's works, favorites, followers, recommendations and etc.
14+
* Filter image width, height, type, tags and etc.
1715

1816
## Usage
1917

@@ -37,10 +35,6 @@ They can be downloaded in [GitHub Releases](https://github.com/txperl/PixivBiu/r
3735

3836
- [Docker_Buildx_PixivBiu](https://github.com/zzcabc/Docker_Buildx_PixivBiu) by [zzcabc](https://github.com/zzcabc)
3937

40-
## Document
41-
42-
Currently, there are only **usage and API** documents, please visit [here](https://biu.tls.moe/) if you need it.
43-
4438
## Contribution
4539

4640
If you want to participate in the development of this project, you are welcome to check [development document](https://biu.tls.moe/#/develop/quickin).

README_JA.md

+1-7
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ PixivBiuはPixivのための**補助的な**ツールです。
1010
* お気に入り数(会員の除外可)順や人気順でのPixiv検索
1111
* イラスト/漫画/うごイラを含む画像のオリジナル画質でのダウンロード
1212
* シングル/マルチスレッドや [aria2](https://github.com/aria2/aria2) などでのダウンロード
13-
* 画像の幅、高さ、アスペクト比、タイプ、時間、ラベルなどをフィルタリングします
1413
* 指定したユーザの投稿作品/ブックマーク/フォロワー/関連するおすすめなどの取得
15-
* 当日/週間/月間/特定の日付別などでのランキングの取得
16-
* ブックマークやフォロー中のユーザなどの取得
14+
* 画像の幅、高さ、タイプ、ラベルなどをフィルタリングします
1715

1816
## 使い方
1917

@@ -37,10 +35,6 @@ Windows 版と macOS 版が利用可能ですが、もし必要であれば自
3735

3836
- [Docker_Buildx_PixivBiu](https://github.com/zzcabc/Docker_Buildx_PixivBiu) by [zzcabc](https://github.com/zzcabc)
3937

40-
## ドキュメント
41-
42-
現在,**使い方とAPI**のドキュメントのみがあります,必要に応じて[こちら](https://biu.tls.moe/)をご参照ください。
43-
4438
## 貢献
4539

4640
もしこのプロジェクトの開発に参加したいのであれば、お気軽に[開発ドキュメント(中文)](https://biu.tls.moe/#/develop/quickin)をご参照ください。

app/config/switch.yml

-20
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,12 @@
11
# 开启或停用模块
22
# true 为开启,false 为停用
33
OnOff:
4-
ins:
5-
cache.py: false
64
pre:
7-
rate_limit.py: false
8-
# rate limit 预处理,开启后请修改下方相关配置
95
verify_referrer.py: false
106
# 简单防盗链预处理,开启后请修改下方相关配置
117

128
# 预处理安全相关
139
Security:
14-
# rate limit 相关设置
15-
rateLimit:
16-
maxRequests: 30
17-
# 一个 timeSecond 内同一 IP 允许的最大请求数
18-
19-
timeSeconds: 60
20-
# 时间周期,单位为秒
21-
22-
allowOrigin:
23-
# 以下 IP 可无视上述规则
24-
- 127.0.0.1
25-
26-
banOrigin:
27-
# 以下 IP 会被拒绝请求
28-
- null
29-
3010
# 防盗链相关设置
3111
onlyReferrer:
3212
type: ban

app/lib/core/biu.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import atexit
12
import os
23
import platform
34
import sys
@@ -14,7 +15,7 @@
1415
@interRoot.bind("biu", "LIB_CORE")
1516
class CoreBiu(interRoot):
1617
def __init__(self):
17-
self.ver = 206001
18+
self.ver = 206010
1819
self.place = "local"
1920
self.sysPlc = platform.system()
2021
self.api_route = "direct"
@@ -32,10 +33,8 @@ def __init__(self):
3233
self.STATUS = {"rate_search": {}, "rate_download": {}}
3334
self.auto()
3435

35-
def __del__(self):
36-
self.pool_srh.shutdown(False)
37-
3836
def auto(self):
37+
atexit.register(self.__before_exit)
3938
self.__load_config() # 加载配置项
4039
self.__pre_check() # 运行前检测
4140
self.proxy = self.__get_system_proxy() # 加载代理地址
@@ -48,6 +47,9 @@ def auto(self):
4847
self.__show_ready_info() # 展示初始化完成信息
4948
return self
5049

50+
def __before_exit(self):
51+
self.pool_srh.shutdown(False)
52+
5153
def __load_config(self):
5254
"""
5355
加载 pixivbiu 的全局配置项。

app/lib/ins/cache.py

-98
This file was deleted.

app/pre/rate_limit.py

-36
This file was deleted.

usr/static/multiverse/assets/css/n.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
.poptrox-popup .caption {
208208
position: fixed;
209209
background-image: none;
210+
text-shadow: 0 0 15px #000;
210211
}
211212

212213
.poptrox-popup:before {
@@ -215,7 +216,6 @@
215216

216217
.poptrox-popup .nav-previous,
217218
.poptrox-popup .nav-next {
218-
position: fixed;
219219
display: block !important;
220220
filter: drop-shadow(0 0 3px rgb(0, 0, 0));
221221
}

0 commit comments

Comments
 (0)