$ show YaoZeyuan/zhihuhelp
ZhihuHelper is a desktop application built with Electron, React, and Node.js designed to scrape content from Zhihu (a Chinese Q&A platform) and export it to EPUB/HTML formats for offline reading. The application features a GUI for task configuration and logging, alongside a CLI interface powered by AdonisJS Ace. Core functionality includes fetching various Zhihu content types (answers, articles, pins, collections, etc.) via the platform's API, storing data in a local SQLite database, and generating formatted e-books with options for sorting, image quality selection, and automatic volume splitting. The architecture separates concerns into distinct layers: Electron main process for window management and IPC, React renderer for the UI, API wrappers for Zhihu endpoints, Knex-based ORM models for data persistence, and a custom EPUB generation library. While the tool effectively accomplishes its stated purpose, it exhibits signs of technical drift due to outdated dependencies and reliance on Zhihu's undocumented API, which necessitates frequent maintenance to remain functional.
The LLM identified 2 files worth highlighting for reuse:
Self-contained EPUB generation library that processes structured content metadata and HTML strings to produce valid EPUB files, including OPF/TOC generation, image embedding, and automatic volume splitting. Demonstrates expertise in EPUB specification implementation and binary asset packaging without external dependencies beyond Node.js built-ins and two lightweight packages (adm-zip, uuid).
Generic asynchronous task manager with concurrency control, rate limiting (via delay between tasks), and retry mechanisms. Isolated from Zhihu-specific logic, making it reusable for any project requiring controlled execution of async operations (e.g., API calls). Demonstrates skill in designing a flexible, dependency-free utility for managing task queues.