debate

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxLineProcessed = 100
)
View Source
const (
	MaxPDFSample = 3
)

Variables

This section is empty.

Functions

func NewDebateSession

func NewDebateSession()

func NewDebateTopic

func NewDebateTopic()

func NewSessionMeta

func NewSessionMeta()

func RangeTOC

func RangeTOC(pdfDoc *PDFDocument) (startPage int, endPage int)

Types

type DebateAttendees

type DebateAttendees struct {
	FullName     string
	ShortName    string
	Constituency string
	Party        string
}

type DebateSession

type DebateSession struct {
	SessionName   string
	SessionDate   string
	SessionMeta   SessionMeta
	DebateTopics  []DebateTopic
	OrderedEvents []Events
	Attendees     []DebateAttendees
}

type DebateTOC

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

func NewDebateTOC

func NewDebateTOC(sourcePath string) (*DebateTOC, error)

func NewDebateTOCPDFContent

func NewDebateTOCPDFContent(pdfDoc *PDFDocument) (*DebateTOC, error)

type DebateTopic

type DebateTopic struct {
	TopicName    string
	PageNumStart int
	PageNumEnd   int
}

type ErrorNoTOCFound

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

func (ErrorNoTOCFound) Error

func (e ErrorNoTOCFound) Error() string

type Events

type Events struct {
	EventTime     string
	EventTitle    string
	EventSubTitle string
	PageStart     int
	PageEnd       int
	RelatedOrgs   []Organization
}

type ExtractPDFOptions

type ExtractPDFOptions struct {
	StartPage int
	NumPages  int
}

type MeetingNum

type MeetingNum int
const (
	DEBATE_MESYUARAT1 MeetingNum = iota
	DEBATE_MESYUARAT2
	DEBATE_MESYUARAT3
	DEBATE_MESYUARAT4
	DEBATE_MESYUARAT5
)

type Organization

type Organization struct {
	OrgName    string
	OrgMembers []DebateAttendees
}

type PDFDocument

type PDFDocument struct {
	NumPages   int
	Pages      []PDFPage
	SourcePath string
}

func NewPDFDoc

func NewPDFDoc(sourcePath string, options *ExtractPDFOptions) (*PDFDocument, error)

func NewPDFDocForTOC

func NewPDFDocForTOC(sourcePath string) (*PDFDocument, error)

type PDFPage

type PDFPage struct {
	PageNo           int
	PDFTxtSameLines  []string // combined content with same line .. proxy for changes
	PDFTxtSameStyles []string // combined content with same style .. proxy for changes
}

type ParliamentSession

type ParliamentSession int
const (
	DEBATE_PAR01 ParliamentSession = iota
	DEBATE_PAR02
	DEBATE_PAR03
	DEBATE_PAR04
	DEBATE_PAR05
	DEBATE_PAR06
	DEBATE_PAR07
	DEBATE_PAR08
	DEBATE_PAR09
	DEBATE_PAR10
	DEBATE_PAR11
	DEBATE_PAR12
	DEBATE_PAR13
	DEBATE_PAR14
	DEBATE_PAR15
	DEBATE_PAR16
)

type ParliamentTerm

type ParliamentTerm int
const (
	DEBATE_PENGGAL1 ParliamentTerm = iota
	DEBATE_PENGGAL2
	DEBATE_PENGGAL3
	DEBATE_PENGGAL4
	DEBATE_PENGGAL5
)

type SessionDay

type SessionDay int
const (
	DEBATE_MONDAY SessionDay = iota
	DEBATE_TUESDAY
	DEBATE_WEDNESDAY
	DEBATE_THURSDAY
	DEBATE_FRIDAY
	DEBATE_SATURDAY
	DEBATE_SUNDAY
)

type SessionMeta

type SessionMeta struct {
	SessionNum        int
	ParliamentSession ParliamentSession
	ParliamentTerm    ParliamentTerm
	MeetingNum        MeetingNum
	SessionDay        SessionDay
}

Jump to

Keyboard shortcuts

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