Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qsoulior/scheduleparser
https://github.com/qsoulior/scheduleparser
Last synced: 30 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/qsoulior/scheduleparser
- Owner: qsoulior
- License: mit
- Created: 2022-03-12T18:39:43.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-15T19:35:02.000Z (over 2 years ago)
- Last Synced: 2023-07-27T22:30:20.834Z (over 1 year ago)
- Language: Go
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Schedule Parser
[![Go Reference](https://img.shields.io/badge/-docs-007d9c?style=flat-square&logo=go&logoColor=white)](https://pkg.go.dev/github.com/qsoulior/scheduleparser)
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/qsoulior/scheduleparser?style=flat-square)
[![Go Report Card](https://goreportcard.com/badge/github.com/qsoulior/scheduleparser?style=flat-square)](https://goreportcard.com/report/github.com/qsoulior/scheduleparser)Schedule Parser is a library for parsing pdf schedules with specific layout.
## Installation
```
go get -u github.com/qsoulior/scheduleparser
```## Features
### Parse file
```go
initialDate := time.Now()
err := scheduleparser.ParseFile("input.pdf", "output.json", initialDate)
if err != nil {
log.Fatal(err)
}
```### Parse bytes
```go
initialDate := time.Now()// os.ReadFile (as of Go 1.16) reads file and returns bytes
contents, err := os.ReadFile("input.pdf")
if err != nil {
log.Fatal(err)
}
// or get bytes in another wayresult, err := scheduleparser.ParseBytes(contents, initialDate)
if err != nil {
log.Fatal(err)
}
```