No description
- Svelte 56.1%
- Go 23.8%
- NSIS 8.9%
- JavaScript 8.1%
- TypeScript 2.1%
- Other 1%
- Added functionality to add, remove, rename, and fetch OPDS servers in the Go backend. - Created a new OPDS page in the Svelte frontend for browsing OPDS feeds. - Implemented OPDS server authentication and error handling. - Enhanced the database schema to support OPDS server storage. - Updated the UI to manage OPDS servers with context menus and dialogs. - Improved overall user experience with loading states and error messages. |
||
|---|---|---|
| build | ||
| frontend | ||
| internal | ||
| .gitignore | ||
| .gitmodules | ||
| app.go | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| README.md | ||
| TODO.md | ||
| wails.json | ||
FoliGo
FoliGo — 跨平台桌面电子书阅读器,基于 foliate-js 渲染引擎,使用 Go + Wails + Svelte 构建。支持 Windows、macOS、Linux。
特性
- 多格式 — EPUB / MOBI / AZW3 / FB2 / CBZ / PDF / TXT
- 书架管理 — 导入、扫描目录、搜索、右键菜单
- 阅读体验 — 翻页/滚动模式、浅色/护眼/深色主题、自定义字体/行距/边距/列数
- 进度同步 — 阅读位置自动保存,下次打开恢复
- 元数据提取 — 标题、作者、封面(EPUB 支持完善)
- 键盘快捷键 —
← →翻页、Space下一页、Esc返回
技术栈
| 层 | 技术 |
|---|---|
| 桌面框架 | Wails v2 |
| 后端 | Go + SQLite (modernc.org/sqlite) |
| 前端 | Svelte 3 + Vite 3 |
| 电子书引擎 | foliate-js (MIT) |
| ZIP 解压 | zip.js / fflate (foliate-js vendor) |
开发
依赖
- Go 1.23+
- Node.js 22+
- Wails CLI v2 (
go install github.com/wailsapp/wails/v2/cmd/wails@latest)
启动
# 克隆
git clone --recurse-submodules https://git.liyp.cc/xmengnet/Foligo.git
cd FoliGo
# 安装依赖
cd frontend && npm install && cd ..
# 开发模式
wails dev
# 构建
wails build
项目结构
FoliGo/
├── main.go # 应用入口
├── app.go # Go 后端 API (书架/进度/设置/标注)
├── internal/
│ ├── db/ # SQLite 数据库层
│ ├── models/ # 数据模型 (Book/Setting/Annotation)
│ └── scanner/ # 文件扫描 & 元数据提取
├── frontend/
│ ├── src/
│ │ ├── App.svelte # 全局布局/侧边栏
│ │ ├── pages/
│ │ │ ├── Library.svelte # 书架
│ │ │ └── Reader.svelte # 阅读器
│ │ └── lib/
│ │ ├── store.js # Svelte 状态管理
│ │ └── foliate-js/ # 渲染引擎 (git submodule)
│ ├── public/ # Vite 静态资源
│ └── index.html
└── build/
├── appicon.png # 应用图标
└── icon.svg
构建发布
# Linux
wails build
# Windows (交叉编译需 mingw-w64)
wails build -platform windows/amd64
# macOS
wails build -platform darwin/amd64
wails build -platform darwin/arm64
产物在 build/bin/FoliGo。
数据库
SQLite 数据库存储在 ~/.config/FoliGo/foligo.db,封面缓存 ~/.config/FoliGo/covers/。删除此目录即可重置所有数据。
License
MIT