feat (timer): Add support for new timer layout.
This commit is contained in:
7
tests/__init__.py
Normal file
7
tests/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
||||
# !/bin/python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.insert(0, os.path.join(os.getcwd()))
|
||||
sys.path.insert(0, os.path.join(os.getcwd(), "src"))
|
||||
0
tests/gui/__init__.py
Normal file
0
tests/gui/__init__.py
Normal file
@@ -1,11 +1,11 @@
|
||||
import asyncio
|
||||
import datetime as dt
|
||||
from src.cards import WeeklyGoalCard
|
||||
from gui.cards import WeeklyGoalCard
|
||||
|
||||
|
||||
async def get_card():
|
||||
card = await WeeklyGoalCard.generate_sample()
|
||||
with open('samples/weekly-sample.png', 'wb') as image_file:
|
||||
with open('output/weekly-sample.png', 'wb') as image_file:
|
||||
image_file.write(card.fp.read())
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
15
tests/gui/cards/pomo_sample.py
Normal file
15
tests/gui/cards/pomo_sample.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import asyncio
|
||||
import datetime as dt
|
||||
from gui.cards import BreakTimerCard, FocusTimerCard
|
||||
|
||||
|
||||
async def get_card():
|
||||
card = await BreakTimerCard.generate_sample()
|
||||
with open('output/break_timer_sample.png', 'wb') as image_file:
|
||||
image_file.write(card.fp.read())
|
||||
card = await FocusTimerCard.generate_sample()
|
||||
with open('output/focus_timer_sample.png', 'wb') as image_file:
|
||||
image_file.write(card.fp.read())
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(get_card())
|
||||
Reference in New Issue
Block a user