How gokselb/udfpdf works
udfpdf converts UYAP UDF archives into PDF, DOCX, HTML, Markdown, or plain text through a CLI or programmatic API. The main workflow extracts archive files, parses UYAP XML and metadata, builds a styled document model, then renders the selected format; the CLI writes the result to a file. The graph also shows style resolution as an internal layer. Renderer capabilities are documented in the README; extraction and XML-parser connections are supported by the source index, but those implementations were not excerpted.
Main entry points: index.ts Parse and convert API · cli.ts CLI · document-model.ts Model builder · style-resolver.ts Style resolution
Components 14
Entry points
- CLI
src/cli.ts - Parse and convert API
src/index.ts
UDF parsing
- Archive extraction
src/parser/unzip.ts - UYAP XML parsing
src/parser/xml-parser.ts
Document model
- Model builder
src/parser/document-model.ts - Style resolution
src/utils/style-resolver.ts - Color conversion
src/utils/color.ts
Output rendering
- Text renderer
src/renderers/text.ts - HTML renderer
src/renderers/html.ts - Markdown renderer
src/renderers/markdown.ts - PDF renderer
src/renderers/pdf.ts - DOCX renderer
src/renderers/docx.ts
Other components
- User or API client
- Output filesystem
Connections 19
- User or API client → CLI: runs conversion
README.md - User or API client → Parse and convert API: calls API
README.md - CLI → Parse and convert API: parses input
src/cli.ts - Parse and convert API → Archive extraction: extracts archive
src/index.ts - Parse and convert API → UYAP XML parsing: parses XML
src/index.ts - Parse and convert API → Model builder: builds model
src/index.ts - Model builder → Style resolution: resolves styles
src/parser/document-model.ts - Style resolution → Color conversion: converts colors
src/utils/style-resolver.ts - Parse and convert API → Text renderer: renders text
src/index.ts - Parse and convert API → HTML renderer: renders HTML
src/index.ts - Parse and convert API → Markdown renderer: renders Markdown
src/index.ts - Parse and convert API → PDF renderer: renders PDF
src/index.ts - Parse and convert API → DOCX renderer: renders DOCX
src/index.ts - CLI → Text renderer: renders text
src/cli.ts - CLI → HTML renderer: renders HTML
src/cli.ts - CLI → Markdown renderer: renders Markdown
src/cli.ts - CLI → PDF renderer: renders PDF
src/cli.ts - CLI → DOCX renderer: renders DOCX
src/cli.ts - CLI → Output filesystem: writes output
src/cli.ts