UDF CLI
Convert between UYAP UDF file format and HTML/Markdown. Make Turkey's judiciary document format readable for AI agents.
Overview
UDF is the document format used by UYAP (Turkey's National Judiciary Informatics System — the unified IT system connecting all Turkish courts). It's a ZIP archive containing content.xml with text, formatting, images, and tables in a custom XML schema.
This CLI tool converts UDF files to HTML and Markdown — and vice versa. The udf2md command is particularly useful for AI agents that need to read court documents.
Commands
udf-cli html2udf— Convert HTML to UDFudf-cli udf2html— Convert UDF to HTMLudf-cli md2udf— Convert Markdown to UDFudf-cli udf2md— Convert UDF to Markdown (ideal for AI agents)
Installation
npm install -g udf-cli
# or
npx udf-cli
Usage
# Convert UDF to Markdown
udf-cli udf2md document.udf -o output.md
# Convert HTML to UDF
udf-cli html2udf document.html -o output.udf
# Read from stdin
cat document.html | udf-cli html2udf -o output.udf
Library Usage
import { htmlToUdf, udfToHtml, udfToMarkdown, markdownToUdf } from 'udf-cli'
Supported HTML Elements
Paragraphs, headings (h1-h6), bold, italic, underline, span styles, images (base64), tables (nested supported), lists, and div elements. Full roundtrip support.