$ show OnlyFart/Elib2Ebook
Elib2Ebook is a .NET 10 application that downloads books from 60+ online libraries (Litres, MyBook, BookRiver, etc.) and converts them into standard ebook formats (EPUB, FB2, CBZ, JSON, TXT). It is a dual-deployment solution: a CLI tool and a Blazor web UI, both sharing a core domain and service layer. The architecture is a layered .NET solution with Domain, DomainServices, and per-site ExternalServices projects, using a reflection-based GetterFactory to auto-discover site adapters. The system handles site-specific anti-bot measures, authentication, and pagination, then normalizes content into a common domain model before passing it to format-specific builders.
The LLM identified 3 files worth highlighting for reuse:
Reflection-based factory that discovers and instantiates site-specific getters from all ExternalServices assemblies. Adding a new site only requires a new project and a getter class; the factory automatically picks it up. Demonstrates a clean extensibility pattern, though it relies on naming conventions and can fail silently if misconfigured.
Converts the normalized domain model (Book, Chapter, Author) into FB2 XML. Isolated from HTTP concerns, making it reusable for any source that produces the domain model. Part of a family of builders (Epub, Cbz, Txt) that share a common interface.
Central configuration for HTTP clients used by all getters, including proxy settings, Flaresolverr integration, timeouts, and delays. Encapsulates cross-cutting HTTP concerns and can be reused across different site adapters.