Files
readflow/src/core/mod.rs
大麦 600f205c87 feat: 完成 Phase 2-4 核心功能
## Phase 2 - 核心功能 (P0)
- Issue #5: EPUB/MOBI/AZW3 格式支持 
  - 修复 mobi 库 API 调用 (content_raw → content_as_string)
  - 修复 title()/author() 返回类型
  - 添加元数据提取功能

- Issue #6: Markdown 阅读模式 
  - 实现 parse_markdown_with_metadata
  - 支持 Front Matter (YAML) 解析
  - 使用 pulldown-cmark 解析引擎
  - 支持代码文件高亮

- Issue #7: 双语翻译功能 
  - 实现 TranslationService (阿里百炼/DeepL/Ollama)
  - 语言自动检测
  - 双语对照 HTML 渲染 (并排/段落交错模式)

- Issue #8: 笔记与书签系统 
  - BookmarkManager (高亮/下划线/波浪线/边注)
  - NoteManager (阅读笔记/想法/问题/总结)
  - 阅读统计 (时长/会话数/笔记数)
  - 导出 Markdown/CSV/Anki

## Phase 3 - 高级功能 (P1)
- Issue #9: 代码阅读器 
  - 支持 20+ 编程语言
  - syntect 语法高亮
  - 行号显示/代码折叠

- Issue #10: 全文双语对照 
  - 段落级翻译对照
  - 并排/交错两种模式
  - 响应式布局

- Issue #11: 阅读进度同步 
  - 本地进度追踪
  - 云端同步支持
  - 多设备冲突解决

- Issue #12: 插件系统 
  - 插件加载/卸载/启用/禁用
  - 插件依赖管理
  - 内置主题/快捷键插件

## Phase 4 - 性能与生态 (P1)
- Issue #13: 性能优化 
  - PerformanceProfiler 性能分析
  - CacheManager LRU 缓存
  - 性能监控与优化建议

## 技术栈更新
- 新增依赖:reqwest, uuid, chrono(serde)
- 核心模块:8 个 (document/translation/bookmark/note/code_reader/progress/plugin/performance)
- 代码量:~5000 行

---
🚀 ReadFlow MVP 核心功能全部完成!
2026-03-10 14:29:56 +08:00

21 lines
802 B
Rust

//! 核心服务模块
//!
//! 包含文档处理、翻译、书签、笔记、代码阅读、进度同步、插件、性能优化等功能
pub mod document;
pub mod translation;
pub mod bookmark;
pub mod note;
pub mod code_reader;
pub mod progress;
pub mod plugin;
pub mod performance;
pub use document::DocumentEngine;
pub use translation::TranslationService;
pub use bookmark::{Bookmark, BookmarkManager, HighlightType};
pub use note::{Note, NoteManager, NoteType, ReadingSession, ReadingStats};
pub use code_reader::{CodeReader, CodeDocument, CodeLanguage};
pub use progress::{ReadingProgress, ProgressManager, SyncConfig, CloudSync};
pub use plugin::{PluginManager, Plugin, PluginManifest, PluginStatus, PluginInfo};
pub use performance::{PerformanceProfiler, PerformanceMetrics, CacheManager};