Files
docutranslate/docutranslate/converter/converter_identity.py
xunbu 5cd0156978 fix
2025-08-24 12:02:56 +08:00

15 lines
550 B
Python

from dataclasses import dataclass
from typing import Hashable
from docutranslate.converter.base import Converter, ConverterConfig
from docutranslate.ir.document import Document
class ConverterIdentity(Converter):
def convert(self, document: Document) -> Document:
return Document.from_bytes(content=document.content, suffix=document.suffix, stem=document.stem)
async def convert_async(self, document: Document) -> Document:
return Document.from_bytes(content=document.content, suffix=document.suffix, stem=document.stem)