pdfextract

package
v0.0.0-...-cd47103 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrettyPrintStruct

func PrettyPrintStruct(layout interface{}) error

func ValidateMarking

func ValidateMarking(form_values []FormValues, parts []*PaperStructure, outputCSV string) error

func WriteResultsToCSV

func WriteResultsToCSV(results []ScanResult, outputPath string) error

Types

type FormValues

type FormValues struct {
	CourseCode string `csv:"CourseCode"`
	Marker     string `csv:"Marker"`
	ExamNumber string `csv:"ExamNumber"`
	Page       int    `csv:"Page"`
	Field      string `csv:"Field"`
	FieldName  string `csv:"FieldName"`
	Value      string `csv:"Value"`
}

func ReadFormFromPDF

func ReadFormFromPDF(path string, include_nonempty_values bool) []FormValues

func ReadFormsInDirectory

func ReadFormsInDirectory(formsPath string, outputCSV string) []FormValues

type PaperStructure

type PaperStructure struct {
	Part  string `csv:"part"`
	Marks int    `csv:"marks"`
}

Structure for the optional reading a csv of parts and marks

func GetPartsAndMarks

func GetPartsAndMarks(csv_path string) []*PaperStructure

type ScanResult

type ScanResult struct {
	ScanPerfect            bool   `csv:"ScanPerfect"`
	ScanRotated            bool   `csv:"ScanRotated"`
	ScanContrast           bool   `csv:"ScanContrast"`
	ScanFaint              bool   `csv:"ScanFaint"`
	ScanIncomplete         bool   `csv:"ScanIncomplete"`
	ScanBroken             bool   `csv:"ScanBroken"`
	ScanComment1           string `csv:"ScanComment1"`
	ScanComment2           string `csv:"ScanComment2"`
	HeadingPerfect         bool   `csv:"HeadingPerfect"`
	HeadingVerbose         bool   `csv:"HeadingVerbose"`
	HeadingNoLine          bool   `csv:"HeadingNoLine"`
	HeadingNoQuestion      bool   `csv:"HeadingNoQuestion"`
	HeadingNoExamNumber    bool   `csv:"HeadingNoExamNumber"`
	HeadingAnonymityBroken bool   `csv:"HeadingAnonymityBroken"`
	HeadingComment1        string `csv:"HeadingComment1"`
	HeadingComment2        string `csv:"HeadingComment2"`
	FilenamePerfect        bool   `csv:"FilenamePerfect"`
	FilenameVerbose        bool   `csv:"FilenameVerbose"`
	FilenameNoCourse       bool   `csv:"FilenameNoCourse"`
	FilenameNoID           bool   `csv:"FilenameNoID"`
	InputFile              string `csv:"InputFile"`
	BatchFile              string `csv:"BatchFile"`
	BatchPage              int    `csv:"BatchPage"`
	Submission             parselearn.Submission
}

Jump to

Keyboard shortcuts

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