courseoutline

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

/courseoutline course_code:<code> - get the course outline for a course by the course code

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSchoolMenu

func CreateSchoolMenu(sess *discordgo.Session, i *discordgo.InteractionCreate) (string, error)

TODO: unable to get school information. Skipping for now

func GenerateSubjectCodeCompletion

func GenerateSubjectCodeCompletion(sess *discordgo.Session, i *discordgo.InteractionCreate) (string, error)

GenerateSubjectCodeCompletion get the subject codes to fill in for autocompletion based on current user input

func GeneratewebPageURL

func GeneratewebPageURL(sess *discordgo.Session, i *discordgo.InteractionCreate) string

GeneratewebPageURL constructs a url that leads to the course outline page for the selected course. return: url to the webpage containing course outline

func GetStringInBetween

func GetStringInBetween(str string, start string, end string) (result string)

GetStringInBetween Returns empty string if no start string found

Types

type CourseInfo

type CourseInfo struct {
	// title of course
	Title string
	// course description
	Description string
	URL         string
}

func GetCourseInfo

func GetCourseInfo(url string) CourseInfo

GetCourseInfo scrapes the url passed in to get course information url: the course outline to scrape. return: CourseInfo struct containing the title and description of the course.

Jump to

Keyboard shortcuts

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