parser

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnknownReportCardStructure = errors.New("unknown report card structure")
)

Functions

This section is empty.

Types

type AbsenceReport added in v0.4.0

type AbsenceReport struct {
	Student     string          `json:"student"`
	Orientation string          `json:"orientation"`
	Courses     []CourseAbsence `json:"courses"`
}

type ClassGrade added in v0.2.0

type ClassGrade struct {
	Name   string `json:"name"`
	Weight uint   `json:"weight"`
	Grade  string `json:"grade"`
}

type ClassGrades

type ClassGrades struct {
	Name        string        `json:"name"`
	GlobalMean  string        `json:"globalMean"`
	HasExam     bool          `json:"hasExam"`
	GradeGroups []*GradeGroup `json:"gradeGroups"`
}

type CourseAbsence added in v0.4.0

type CourseAbsence struct {
	Name    string `json:"name"`
	Periods struct {
		Ete   int `json:"ete"`
		Term1 int `json:"term1"`
		Term2 int `json:"term2"`
		Term3 int `json:"term3"`
		Term4 int `json:"term4"`
	} `json:"periods"`
	Total           int `json:"total"`
	Justified       int `json:"justified"`
	RelativePeriods int `json:"relativePeriods"`
	AbsolutePeriods int `json:"absolutePeriods"`
}

type Grade

type Grade struct {
	Description string    `json:"description"`
	Date        time.Time `json:"date"`
	Weight      float32   `json:"weight"`
	Grade       string    `json:"grade"`
	ClassMean   string    `json:"classMean"`
}

type GradeGroup

type GradeGroup struct {
	Name   string   `json:"name"`
	Mean   string   `json:"mean"`
	Weight uint     `json:"weight"`
	Grades []*Grade `json:"grades"`
}

type ModuleClass added in v0.2.0

type ModuleClass struct {
	Identifier string        `json:"id"`
	Name       string        `json:"name"`
	Grades     []*ClassGrade `json:"grades"`
	Mean       string        `json:"mean"`
	Weight     uint          `json:"weight"`
}

type ModuleReport added in v0.2.0

type ModuleReport struct {
	Identifier   string         `json:"id"`
	Name         string         `json:"name"`
	Year         uint           `json:"year"`
	PassingGrade string         `json:"passingGrade"`
	GlobalGrade  string         `json:"grade"`
	Credits      uint           `json:"credits"`
	Situation    string         `json:"situation"`
	Classes      []*ModuleClass `json:"classes"`
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func FromResponseBody

func FromResponseBody(reader io.Reader) (*Parser, error)

func FromString

func FromString(text string) (*Parser, error)

func (*Parser) Absences added in v0.4.0

func (s *Parser) Absences() (*AbsenceReport, error)

func (*Parser) Grades

func (s *Parser) Grades() ([]*ClassGrades, error)

func (*Parser) ReportCard added in v0.2.0

func (s *Parser) ReportCard() ([]*ModuleReport, error)

func (*Parser) StudentId

func (s *Parser) StudentId() (uint, error)

Jump to

Keyboard shortcuts

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