DOC-103 实现 TXT 文本读取 #8
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
读取 TXT 内容,按段落或行生成 block。
UTF-8 读取,非法编码返回明确错误。
验收标准:能读取 UTF-8 TXT、能生成 paragraph blocks、能返回 line count/word count、有单元测试
完成项
✅ read_text(file_path) 已实现,UTF-8 读取
✅ parse_text_content(content) 按空行分段落
✅ text_stats(content) 返回行数和字数
API
测试
待跟进
⬜ DOC-104 图片 metadata
补充:FFI 已暴露
✅
parseText(content:)→[DocumentBlock]已通过 UDL 导出✅ 按空行分段,返回 Paragraph blocks
✅
readTextStats(filePath:)返回行数/字数✅
TextStats { line_count, word_count }已暴露Swift 调用示例: