document-ocr / ocr_studio /export_text.py
alirezaaminzadeh's picture
Publish Persian and English document OCR
b411c37 verified
Raw
History Blame Contribute Delete
214 Bytes
from __future__ import annotations
from pathlib import Path
def write_text_file(text: str, destination: Path) -> Path:
destination.write_text(text or "", encoding="utf-8-sig")
return destination