mirror of
https://github.com/Dadido3/Scanyonero.git
synced 2025-06-06 01:10:00 +00:00
- Rename to Scanyonero - Add FTP server that ingests TIFF, PNG, JPEG or PDF files - Add web interface to check and modify ingested files - Rework how ocrmypdf is invoked Basics are working, but the program is not in a usable state.
27 lines
562 B
Go
27 lines
562 B
Go
package main
|
|
|
|
import (
|
|
"Scanyonero/document"
|
|
"log"
|
|
"path/filepath"
|
|
)
|
|
|
|
func LoadExampleQueueEntries() []QueueEntry {
|
|
ingestor := document.Ingestor{DefaultDPI: 600}
|
|
|
|
pages, err := ingestor.Ingest(document.MustLoadFile(filepath.Join("test-documents", "300 DPI Feeder.jpg")))
|
|
if err != nil {
|
|
log.Panicf("Failed to ingest document: %v", err)
|
|
}
|
|
|
|
var entries []QueueEntry
|
|
for _, page := range pages {
|
|
entries = append(entries, QueueEntry{
|
|
ID: NewQueueEntryID(),
|
|
QueueEntryData: QueueEntryDataPage{Page: &page},
|
|
})
|
|
}
|
|
|
|
return entries
|
|
}
|