rewrite: More restructuring.

This commit is contained in:
2022-12-23 07:19:35 +02:00
parent 1cef97cdd4
commit ee1abcacea
26 changed files with 443 additions and 39 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -0,0 +1,19 @@
from profile import ProfileCard
card = ProfileCard(
name='ARI HORESH',
discrim='#0001',
avatar=open('samples/example_avatar.png', 'rb'),
coins=58596,
time=3750 * 3600,
answers=10,
attendance=0.9,
badges=('MEDICINE', 'NEUROSCIENCE', 'BIO', 'MATHS', 'BACHELOR\'S DEGREE', 'VEGAN SOMETIMES', 'EUROPE'),
achievements=(0, 2, 5, 7),
current_rank=('VAMPIRE', 3000, 4000),
next_rank=('WIZARD', 4000, 8000),
draft=False
)
image = card.draw()
image.save('profilecard.png', dpi=(150, 150))

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

View File

@@ -0,0 +1,27 @@
import datetime as dt
from stats import StatsCard
card = StatsCard(
(21, 123),
(3600, 5 * 24 * 3600, 1.5 * 24 * 3600, 100 * 24 * 3600),
50,
[(1, 3), (7, 8), (10, 10), (12, 16), (18, 25), (27, 31)],
date=dt.datetime(2022, 1, 1),
# draft=True
)
image = card.draw()
image.save('statscard_alt.png', dpi=(150, 150))
card = StatsCard(
(21, 123),
(3600, 5 * 24 * 3600, 1.5 * 24 * 3600, 100 * 24 * 3600),
50,
[(1, 3), (7, 8), (10, 10), (12, 16), (18, 25), (27, 31)],
date=dt.datetime(2022, 2, 1),
# draft=True
)
image = card.draw()
image.save('statscard.png', dpi=(150, 150))

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB