Files
2026-07-06 11:05:50 -04:00

16 lines
495 B
Go

package docx
import "fmt"
// Ingest parses a DOCX resume file and returns markdown text + writing style profile.
// Returns error if file is not a valid DOCX or exceeds MaxDocxSize.
func Ingest(filePath string) (markdown string, style StyleProfile, err error) {
parser := NewDocumentParser(filePath)
md, _, err := parser.ParseDOCX()
if err != nil {
return "", StyleProfile{}, fmt.Errorf("parse docx: %w", err)
}
extractor := NewStyleExtractor(md)
return md, extractor.Extract(), nil
}