Basic messages, needs HTML parsing

This commit is contained in:
Adam Blažek 2020-09-27 12:22:14 +02:00
parent d4e470b442
commit 13919442ec
1 changed files with 14 additions and 0 deletions

View File

@ -77,6 +77,17 @@ proc homework(
stdout.writeLine homework.teacher.fgLightMagenta
stdout.writeLine homework.content
proc messages(
configFile = defaultConfigFile,
) =
withBakalari(defaultConfigFile):
for message in baka.messages(bakalari):
stdout.writeLine "----------------------------------------------------------------".fgLightGray
stdout.writeLine message.sentTime.format("yyyy-MM-dd") .fgLightCyan
stdout.writeLine message.title.fgLightYellow
stdout.writeLine message.sender.fgLightMagenta
stdout.writeLine message.text
proc timetable(
configFile = defaultConfigFile,
date = "",
@ -128,6 +139,9 @@ try:
[homework, help = {
"config-file": "where the credentials are stored",
}],
[messages, help = {
"config-file": "where the credentials are stored",
}],
[timetable, help = {
"config-file": "where the credentials are stored",
"date": "any date inside the week you want to display, in YYYYMMDD format (defaults to today)",