podflow 20250303__py3-none-any.whl → 20250303.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Podflow/basic/qr_code.py +15 -20
- Podflow/main.py +10 -1
- {podflow-20250303.dist-info → podflow-20250303.1.dist-info}/METADATA +2 -3
- {podflow-20250303.dist-info → podflow-20250303.1.dist-info}/RECORD +7 -7
- {podflow-20250303.dist-info → podflow-20250303.1.dist-info}/WHEEL +0 -0
- {podflow-20250303.dist-info → podflow-20250303.1.dist-info}/entry_points.txt +0 -0
- {podflow-20250303.dist-info → podflow-20250303.1.dist-info}/top_level.txt +0 -0
Podflow/basic/qr_code.py
CHANGED
@@ -2,24 +2,19 @@
|
|
2
2
|
# coding: utf-8
|
3
3
|
|
4
4
|
import math
|
5
|
-
import
|
5
|
+
import pyqrcode
|
6
6
|
|
7
7
|
|
8
8
|
# 网址二维码模块
|
9
9
|
def qr_code(data):
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
border=0,
|
10
|
+
qr = pyqrcode.create(
|
11
|
+
data,
|
12
|
+
error='L', # 对应于ERROR_CORRECT_L,可选值: 'L','M','Q','H'
|
13
|
+
version=1, # 指定版本
|
14
|
+
mode='binary' # 编码模式
|
16
15
|
)
|
17
|
-
#
|
18
|
-
qr.
|
19
|
-
# 获取QR Code矩阵
|
20
|
-
qr.make(fit=True)
|
21
|
-
matrix = qr.make_image(fill_color="black", back_color="white").modules
|
22
|
-
# 获取图像的宽度和高度
|
16
|
+
# 获取QR码矩阵(作为二维数组)
|
17
|
+
matrix = qr.code # 获取图像的宽度和高度
|
23
18
|
width, height = len(matrix), len(matrix)
|
24
19
|
height_double = math.ceil(height / 2)
|
25
20
|
# 转换图像为ASCII字符
|
@@ -29,23 +24,23 @@ def qr_code(data):
|
|
29
24
|
if (y + 1) * 2 - 1 >= height:
|
30
25
|
for x in range(width):
|
31
26
|
ascii_art += (
|
32
|
-
fonts[0] if matrix[(y + 1) * 2 - 2][x]
|
27
|
+
fonts[0] if matrix[(y + 1) * 2 - 2][x] == 1 else fonts[3]
|
33
28
|
)
|
34
29
|
else:
|
35
30
|
for x in range(width):
|
36
31
|
if (
|
37
|
-
matrix[(y + 1) * 2 - 2][x]
|
38
|
-
and matrix[(y + 1) * 2 - 1][x]
|
32
|
+
matrix[(y + 1) * 2 - 2][x] == 1
|
33
|
+
and matrix[(y + 1) * 2 - 1][x] == 1
|
39
34
|
):
|
40
35
|
ascii_art += fonts[2]
|
41
36
|
elif (
|
42
|
-
matrix[(y + 1) * 2 - 2][x]
|
43
|
-
and matrix[(y + 1) * 2 - 1][x]
|
37
|
+
matrix[(y + 1) * 2 - 2][x] == 1
|
38
|
+
and matrix[(y + 1) * 2 - 1][x] == 0
|
44
39
|
):
|
45
40
|
ascii_art += fonts[0]
|
46
41
|
elif (
|
47
|
-
matrix[(y + 1) * 2 - 2][x]
|
48
|
-
and matrix[(y + 1) * 2 - 1][x]
|
42
|
+
matrix[(y + 1) * 2 - 2][x] == 0
|
43
|
+
and matrix[(y + 1) * 2 - 1][x] == 1
|
49
44
|
):
|
50
45
|
ascii_art += fonts[1]
|
51
46
|
else:
|
Podflow/main.py
CHANGED
@@ -1,13 +1,22 @@
|
|
1
|
-
# Podflow/main.py
|
2
1
|
# coding: utf-8
|
3
2
|
|
3
|
+
import signal
|
4
|
+
import sys
|
4
5
|
from datetime import datetime
|
5
6
|
from importlib.metadata import version
|
6
7
|
from Podflow.main_podcast import main_podcast
|
7
8
|
from Podflow.parse_arguments import parse_arguments
|
8
9
|
|
9
10
|
|
11
|
+
def signal_handler(sig, frame):
|
12
|
+
print(f"\r{datetime.now().strftime('%H:%M:%S')}|Podflow被中断, 正在退出...")
|
13
|
+
sys.exit(0)
|
14
|
+
|
15
|
+
|
10
16
|
def main():
|
17
|
+
# 注册SIGINT信号处理器(Ctrl+C)
|
18
|
+
signal.signal(signal.SIGINT, signal_handler)
|
19
|
+
|
11
20
|
# 获取传入的参数
|
12
21
|
parse_arguments()
|
13
22
|
# 开始运行
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: podflow
|
3
|
-
Version: 20250303
|
3
|
+
Version: 20250303.1
|
4
4
|
Summary: A podcast server that includes YouTube and BiliBili
|
5
5
|
Home-page: https://github.com/gruel-zxz/podflow
|
6
6
|
Author: gruel_zxz
|
@@ -14,11 +14,10 @@ Requires-Python: >=3.8
|
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
Requires-Dist: astral>=3.2
|
16
16
|
Requires-Dist: bottle>=0.13.2
|
17
|
-
Requires-Dist: pillow>=11.1.0
|
18
|
-
Requires-Dist: qrcode>=8.0
|
19
17
|
Requires-Dist: yt-dlp>=2025.2.19
|
20
18
|
Requires-Dist: chardet>=5.2.0
|
21
19
|
Requires-Dist: cherrypy>=18.10.0
|
20
|
+
Requires-Dist: pyqrcode>=1.2.1
|
22
21
|
Requires-Dist: requests>=2.32.3
|
23
22
|
Requires-Dist: pycryptodome>=3.21.0
|
24
23
|
Requires-Dist: ffmpeg-python>=0.2.0
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Podflow/__init__.py,sha256=fRgwxrydKSb9rK_ZsZsb2XhbGEgxxTYKmLB4f88fg0M,6908
|
2
2
|
Podflow/download_and_build.py,sha256=LeLjLHnF5N9vdrroDsB-mT4UKY2OwPSL3APUAkhTuwc,671
|
3
3
|
Podflow/ffmpeg_judge.py,sha256=krttVs1PDot_0CDq5rmtUIpchiaiqtAkPYFQRLG6OQM,1275
|
4
|
-
Podflow/main.py,sha256=
|
4
|
+
Podflow/main.py,sha256=qqrhAOHwObQYad77a7Mf4HfmqDl6ZeMaC8DdU_1m98o,697
|
5
5
|
Podflow/main_podcast.py,sha256=IUVEEYpXfyVNSACkDriTPgLsQhjC1xHFZTP5V3zwZZw,8289
|
6
6
|
Podflow/main_upload.py,sha256=FzWWRDK5GmvMas-BcTRBq1H5djVgg5-NF8vXMoo7Sko,886
|
7
7
|
Podflow/parse_arguments.py,sha256=qa5228sralPV7s4JdB6UgS1ug66rBqckDvSOwjz2tIc,2171
|
@@ -13,7 +13,7 @@ Podflow/basic/get_file_list.py,sha256=Y6Nqn6lxhPXiIT2eeCkY7fMPrzFClwjv7kXej4CCFC
|
|
13
13
|
Podflow/basic/get_html_dict.py,sha256=EZQ0Wlu87SFbUFZuakE7JWgFx53FQKpLbP78L7Gww3E,869
|
14
14
|
Podflow/basic/http_client.py,sha256=gvaxg_1lz81tnWCq2HIh-oliShWJCP77JUnYl2v5qng,3003
|
15
15
|
Podflow/basic/list_merge_tidy.py,sha256=o9cEnfEK0bhjf5awls5HyUzg0siPa1e4V97-kqxlpt0,368
|
16
|
-
Podflow/basic/qr_code.py,sha256=
|
16
|
+
Podflow/basic/qr_code.py,sha256=FOPGmhCjBlmO_BK4D1fnjsgG19taZ0mbbHsaZqHtKRc,1593
|
17
17
|
Podflow/basic/split_dict.py,sha256=rxwsGuzBWXJ8nDxcxYI-BqeeccyDTsw011tjkT8rZwI,401
|
18
18
|
Podflow/basic/time_format.py,sha256=Rddq-5wQgo6IrgiMlcMgDA52vQnMvWZvZC8g1Bj3BaQ,487
|
19
19
|
Podflow/basic/time_stamp.py,sha256=vf0p6FIK2-ZN2p2sotbpf4dewQMy-Vior-aREYfT0Zc,1888
|
@@ -85,8 +85,8 @@ Podflow/youtube/__init__.py,sha256=-bdMyuw-wxoz2miVkp284amS4Qg0k7VN0JPuGF-cXlM,4
|
|
85
85
|
Podflow/youtube/build.py,sha256=yy-rPBGs7H4aUjgLNyKz2HE-mjyGTs3b0FL5-KPHPM0,11650
|
86
86
|
Podflow/youtube/get.py,sha256=dFLyiHttygqdJltwC29jD_v8wwoLynE5NUdow_0wERI,16970
|
87
87
|
Podflow/youtube/login.py,sha256=DlS_ZG4g6CKWqS5ojE4UwFJSCSZDsXbeuDVgHtQAa4A,1380
|
88
|
-
podflow-20250303.dist-info/METADATA,sha256=
|
89
|
-
podflow-20250303.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
90
|
-
podflow-20250303.dist-info/entry_points.txt,sha256=44nj8jJB7bo1JLNrKQZmwMGEA1OalrALJ0tF_G0yXLY,131
|
91
|
-
podflow-20250303.dist-info/top_level.txt,sha256=KcvRCiz_DRWWc9i-PgpARvFB0J4CKmpZOZgPqOdG-Lk,8
|
92
|
-
podflow-20250303.dist-info/RECORD,,
|
88
|
+
podflow-20250303.1.dist-info/METADATA,sha256=XCSH2_spdnEMebVVO7X8rtlUqa1dqvTNGG9XKC2dNWc,13807
|
89
|
+
podflow-20250303.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
90
|
+
podflow-20250303.1.dist-info/entry_points.txt,sha256=44nj8jJB7bo1JLNrKQZmwMGEA1OalrALJ0tF_G0yXLY,131
|
91
|
+
podflow-20250303.1.dist-info/top_level.txt,sha256=KcvRCiz_DRWWc9i-PgpARvFB0J4CKmpZOZgPqOdG-Lk,8
|
92
|
+
podflow-20250303.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|