Basic messages, needs HTML parsing
This commit is contained in:
parent
d4e470b442
commit
13919442ec
14
src/bk.nim
14
src/bk.nim
|
@ -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)",
|
||||
|
|
Loading…
Reference in New Issue