rewrite: More restructuring.
This commit is contained in:
BIN
tests/gui/output/example_avatar.png
Normal file
BIN
tests/gui/output/example_avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
19
tests/gui/output/profile_sample.py
Normal file
19
tests/gui/output/profile_sample.py
Normal 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))
|
||||
BIN
tests/gui/output/profilecard.png
Normal file
BIN
tests/gui/output/profilecard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 214 KiB |
27
tests/gui/output/stats_sample.py
Normal file
27
tests/gui/output/stats_sample.py
Normal 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))
|
||||
BIN
tests/gui/output/statscard.png
Normal file
BIN
tests/gui/output/statscard.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
BIN
tests/gui/output/statscard_alt.png
Normal file
BIN
tests/gui/output/statscard_alt.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
Reference in New Issue
Block a user