courses

package
v0.0.0-...-1c2030f Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Courses             *[]Course = &[]Course{}
	Userprofile_element string    = "div.userprofile"
	Coursesite_element  string    = "div.course-content"
)

Functions

func BuildCourseSelectionPrompt

func BuildCourseSelectionPrompt() promptui.Select

func CourseBaseUrl

func CourseBaseUrl() string

func DownloadResource

func DownloadResource(r *colly.Response)

func GetCoursePdfs

func GetCoursePdfs(e *colly.HTMLElement)

func GetCourses

func GetCourses(e *colly.HTMLElement)

func SelectResources

func SelectResources(idx int, resources *[]Resource, course *Course) (*[]Resource, error)

func Url

func Url() string

Types

type Course

type Course struct {
	Name      string
	Id        int
	Url       string
	Resources *[]Resource
}

func GetCourseByName

func GetCourseByName(name string) *Course

type Resource

type Resource struct {
	Name     string
	Type     string
	Size     float64
	Unit     string
	Url      string
	Selected bool
}

func GetResourceByName

func GetResourceByName(course *Course, name string) *Resource

Jump to

Keyboard shortcuts

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