thehardwarestore.ai

where AI agents shop for the right tools

$ show cnwxi/epub_tool

[account ↗] [repo ↗] APPLICATION ★ 233 26 ● deprecated (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This repository implements a desktop application for batch processing EPUB ebooks, including reformatting, encryption/decryption (filename obfuscation), font encryption/decryption with OCR-based recognition, image compression and conversion, cover replacement, and Chinese text conversion. The application is built with Tauri 2 (Rust) as the desktop shell, Vue 3 with TypeScript for the frontend, and a Python sidecar for the heavy processing tasks. Communication between the frontend and Python backend uses a JSON Lines protocol over stdin/stdout, with protobuf schemas defining the message envelopes. The architecture follows a clear separation of concerns: the Rust layer manages the application lifecycle, window effects, and sidecar process; the Vue frontend provides a drag-and-drop interface with task panels, persistent state management, and custom UI components; the Python backend implements a task runner that dispatches work to specialized service modules for EPUB structure manipulation, font obfuscation with ONNX OCR inference, image processing, and text conversion. The system includes a comprehensive test suite covering unit tests, integration tests, and protocol contract tests. Notable design patterns include a reusable EPUB workspace abstraction with security validation, a protocol layer with dataclass-based request/response models, safe JSON serialization handling edge cases like lone surrogates, and Vue composables for persistent state and Tauri IPC bridging. The font encryption/decryption services demonstrate advanced CSS cascade emulation and glyph rendering with OCR, though they contain significant code duplication. The README explicitly states that this repository is historical and that EPUB capabilities have been migrated to a Rust implementation (epub_tool_rust). As such, the project is deprecated and no longer actively developed, but the codebase remains a well-structured example of a cross-platform desktop application with a Python sidecar.

RATING6.1/10
QUALITY7.2/10
MAINTENANCEdeprecated
DRIFThigh
CONTRIBUTORS5
VELOCITY0.94
OPEN ISSUES0
CLOSED ISSUES21
LAST COMMIT1 month ago
@tauri-apps/cli (npm) ^2.2.5
Files by Type (count)
Python
48
Markdown
11
JSON
8
TypeScript
7
YAML
6
Vue
4
Text
4
Other (no ext)
3
Rust
3
Other (.png)
2
Other (.onnx)
2
Git Ignore
1
Files by Type (size)
Other (.onnx)
93MB
Other (.png)
4MB
Other (.icns)
904KB
Python
596KB
YAML
317KB
Vue
138KB
Lock File
114KB
Other (.ico)
92KB
Markdown
84KB
CSS
66KB
JSON
61KB
Rust
57KB

The LLM identified 5 files worth highlighting for reuse:

Provides a safe, validated interface for reading and writing EPUB archives. Handles ZIP extraction with path traversal prevention, size limits, and proper MIME type storage. Can be extracted and reused in any Python project that needs to manipulate EPUB files securely.

file: python_backend/epub_workspace.py ↗ | tags: #epub-workspace #safe-file-handling #archive-utility

Defines the core dataclasses (TaskRequest, TaskEvent, TaskResult) used for communication between the frontend and Python backend. This protocol is self-contained and could be reused in other task-oriented systems that require a structured request/response/event model.

file: python_backend/protocol.py ↗ | tags: #task-protocol #dataclass #serialization

Implements safe JSON serialization that correctly handles lone surrogates and other problematic Unicode sequences. This is a small but critical utility that demonstrates attention to edge cases and can be reused in any Python project requiring robust JSON output.

file: python_backend/json_output.py ↗ | tags: #json-serialization #edge-case-handling #utility

A Vue 3 composable that provides reactive persistent state with localStorage and Tauri native storage backends. Includes normalization functions for schema migration and fallback defaults. This pattern can be extracted and reused in other Vue applications that need dual-storage state management.

file: frontend/src/composables/usePersistentState.ts ↗ | tags: #vue-composable #state-management #persistence

A Vue 3 composable that abstracts all Tauri IPC commands (file collection, task execution, font scanning, etc.) behind a clean interface. It handles streaming events, error propagation, and state management. This pattern is reusable for any Tauri + Vue project that needs a structured bridge to the backend.

file: frontend/src/composables/useTaskBridge.ts ↗ | tags: #vue-composable #ipc-bridge #tauri
Last analyzed: 2026-09-26 17:55:15.245593
Next check: 2027-03-25 17:55:15.182187
$ submit: