Skip to content

LukeGeneva/loose-leaf

Repository files navigation

Loose Leaf

A local-first, plain-text ebook reader. Drop in a .txt file — a Project Gutenberg download works well — and Loose Leaf strips the boilerplate, detects chapters, and remembers where you left off. Everything is stored on disk; nothing leaves the machine.

Built with Tauri (Rust backend, vanilla JS frontend).

Features

  • Import plain-text books by clicking Import or dragging a .txt file onto the window
  • Automatic encoding detection — UTF-8 (with or without BOM), declared Gutenberg headers, and legacy Windows-1252/Latin-1 fallbacks
  • Gutenberg boilerplate stripping — cuts the standard header/footer around *** START/END OF THE PROJECT GUTENBERG EBOOK ***
  • Chapter detection — finds coherent heading sequences (CHAPTER I, Part Two, bare roman numerals, etc.) without erroring on books that don't have them
  • Reading position and font size are saved per book and restored on reopen
  • Rename books in the library view

Project layout

book-core/     Rust library: encoding detection, boilerplate stripping,
               chapter detection (pure logic, no Tauri dependency)
src-tauri/     Tauri app shell: commands, file-based storage, app config
src/           Frontend: vanilla HTML/CSS/JS

The book import pipeline (book_core::import) hashes the original bytes for a stable book ID, decodes to UTF-8, strips boilerplate, then detects chapters — all before anything touches disk.

Development

Requires Node.js, Rust, and the Tauri prerequisites for your OS.

npm install
npm run tauri dev

Build

npm run tauri build

Tests

Rust tests live in book-core (unit tests inline, plus fixture-based import tests in book-core/tests/):

cargo test

About

A local-first reader for plain-text ebooks (Project Gutenberg and beyond).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors