Skip to content

Commit aa0f302

Browse files
committed
update thank list
1 parent 2e10452 commit aa0f302

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

docs/img/thanks.png

44.9 KB
Loading

docs/unicode.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,6 +2440,8 @@ TODO
24402440
24412441
TODO
24422442
2443+
𰻞:0x30EDE
2444+
24432445
### UniFont 字体
24442446
24452447
## 黑暗小技巧

misc/afdian.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ class User(namedtuple('User', ['name', 'avatar', 'all_sum_amount'])):
1313
manual_sponsors = [
1414
User('等疾风', 'https://i0.hdslb.com/bfs/face/b658b5ca52f41e53321d04f978be6784ca6f8687.jpg', '1000.00'),
1515
User('只喝白开水', 'https://i2.hdslb.com/bfs/face/821b88a24c1319d1fb51b3854884e2f829855c75.jpg', '100.00'),
16-
User('*乾', '', '26.90'),
16+
User('包乾', '', '26.90'),
1717
User('柿柿如意', '', '20.00'),
1818
User('Starry', '', '100.00'),
1919
User('阿哲', '', '100.00'),
2020
User('Eureka', '', '20.00'),
2121
User('孙斌', '', '200.00'),
2222
User('nullptr', 'https://i0.hdslb.com/bfs/face/effa1ec9bb0f5d09ed415da75129aca9d16092ac.jpg', '23.30'),
23-
User('**发', '', '25.00'),
23+
User('Fred Song', '', '25.00'),
24+
User('**振', '', '20.00'),
2425
]
2526

2627
def afd_query(which, **params):
@@ -70,11 +71,14 @@ def afd_gen_thank_list():
7071
img = Image.new('RGB', (max_max_x, max_max_y), color='#19242e')
7172
x = 30
7273
y = 30
74+
total = 0
7375
for user in sponsors:
7476
draw = ImageDraw.Draw(img)
7577
font = ImageFont.truetype('/usr/share/fonts/noto-cjk/NotoSansCJK-Medium.ttc', size=20)
7678
if user.avatar:
7779
avatar = Image.open(BytesIO(requests.get(user.avatar).content))
80+
elif os.path.exists(f'/home/bate/下载/wx-{user.name.replace('/', '|')}.png'):
81+
avatar = Image.open(f'/home/bate/下载/wx-{user.name.replace('/', '|')}.png')
7882
else:
7983
this_dir = os.path.dirname(os.path.abspath(__file__))
8084
avatar = Image.open(os.path.join(this_dir, '../docs/img/favicon.ico'))
@@ -83,11 +87,12 @@ def afd_gen_thank_list():
8387
draw.text((x + 100, y), f'{user.name}', fill='white', font=font)
8488
draw.text((x + 100, y + 30), f'¥{user.all_sum_amount}', fill='#aaaaaa', font=font)
8589
print(f'{user.name}{user.all_sum_amount}')
86-
print(user)
90+
total += float(user.all_sum_amount)
8791
y += 100
8892
if y + 10 >= limit_y:
8993
y = 30
9094
x += 400
95+
print(total)
9196
return img
9297

9398
img = afd_gen_thank_list()

0 commit comments

Comments
 (0)