1
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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",
|
||||
)
|
||||
Reference in New Issue
Block a user