A comprehensive Python library for handling UYAP UDF files.
Project description
udf-tools
udf-tools is a comprehensive Python library and command-line interface (CLI) for handling UYAP UDF (National Judiciary Network Project Document Format) files. It allows you to create, edit, and convert UDF documents with ease.
Features
- Create & Edit: Build UDF documents from scratch using a modern Python API.
- DOCX to UDF: Convert standard World (.docx) documents to UDF format.
- Offset Management: Handles the complex internal XML structure and offset-based text referencing of UDF files automatically.
- CLI Support: Easy-to-use command-line interface for batch conversions.
- Rich Output: Enhanced terminal experience with progress indicators.
Installation
pip install udf-tools
Usage
As a Library
from udf_tools.editor import UDFEditor
from udf_tools.models.styles import UDFStyle
# Initialize editor
editor = UDFEditor()
# Add custom styles
editor.add_style(UDFStyle(name="Header", size=16.0, bold=True))
# Add content
editor.add_paragraph("TÜRKİYE CUMHURİYETİ", alignment=1)
editor.add_paragraph("MAHKEME KARARI", style="Header", alignment=1)
editor.add_paragraph("Bu belge otomatik olarak oluşturulmuştur.")
# Save as .udf
editor.save("output_document.udf")
As a CLI
# Convert DOCX to UDF
udf-tools convert input.docx output.udf
# Show help
udf-tools --help
Technical Details
UDF is a ZIP-based format containing a content.xml file. The core of the document is a single CDATA block of text, where various elements (paragraphs, tables, styles) reference the text using startOffset and length. udf-tools manages these offsets for you, so you can focus on building your document.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file udf_tools-0.1.0.tar.gz.
File metadata
- Download URL: udf_tools-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b0027540387c90ec5d479c7c513ad4bde7c0f895aed9d747e480a2c0c729bcf
|
|
| MD5 |
0d7455dc6d4ab366540b3b174b33abd3
|
|
| BLAKE2b-256 |
03465e9ddf17cfee7a32080b12f81429f4ce1dab148b6488f24f5ddf18b438e3
|
File details
Details for the file udf_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: udf_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a16e3344c65166c8e6112381fb696eb51faea7cd35ec7613fcdb5ebd72f8b366
|
|
| MD5 |
1908fb8bdd3fcb52150f59b6edcd4c0a
|
|
| BLAKE2b-256 |
2c3a75c0b5f9d21e30bf3fe686e82fcf1938c4243a889ef01bdf4b5df6921eb8
|