timetables

package
v0.0.0-...-105f304 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2016 License: GPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleCommand

func HandleCommand(bot *telebot.Bot, message telebot.Message, args []string)

HandleCommand handles a /timetable command

func Update

func Update()

Update the timetables from http://ranssi.paivola.fi/lj.php

Types

type Lesson

type Lesson struct {
	Subject        Subject
	Course, Lesson int
}

Lesson stores a subject, the course number and the lesson number.

func ParseLesson

func ParseLesson(str string) *Lesson

ParseLesson attempts to parse a lesson from the given string.

type Subject

type Subject struct {
	ShortName string
	Name      string
}

Subject stores the long and short names of a subject.

type TimetableLesson

type TimetableLesson struct {
	Subject  string
	TimeName string
	Date     util.Date
	Time     util.Time
}

TimetableLesson is a struct that contains the data for a lesson in a timetable

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL