16 lines
455 B
Python
16 lines
455 B
Python
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
from backend.app.services.markdown_builder import title_from_path
|
|
from backend.app.services.processors.base import ProcessedContent
|
|
|
|
|
|
class TextProcessor:
|
|
def process(self, path: Path) -> ProcessedContent:
|
|
return ProcessedContent(
|
|
title=title_from_path(path),
|
|
body=path.read_text(encoding="utf-8", errors="replace"),
|
|
processor="text",
|
|
)
|