Skip to content

Releases: queelius/ebk

v0.5.1

14 Mar 00:20

Choose a tag to compare

Code quality fixes for MCP module

  • Hoist get_pk_constraint out of per-column loop in schema introspection
  • Use sets for O(1) membership tests in collection remove operations
  • Remove dead code in mcp_serve CLI command
  • Align setup.py with pyproject.toml (python_requires, classifiers, extras)
  • Test cleanup: shared fixtures, unused imports

v0.5.0: MCP Server, Major Simplification

13 Mar 15:36

Choose a tag to compare

What's New

MCP Server (ebk mcp-serve) — AI integration via Model Context Protocol with 3 tools:

  • get_schema — introspect library database structure
  • execute_sql — read-only SQL with 3-layer defense (regex, ?mode=ro, authorizer)
  • update_books — batch update metadata, tags, authors, subjects, merge duplicates

What's Removed (~8,500 lines)

Module Lines Reason
ebk/ai/ ~3,300 Replaced by MCP server
ebk/repl/ ~2,300 Unused
ebk/vfs/ ~2,800 Redundant with REST API
ebk/skills/ ~180 Replaced by MCP server

Also removed: LLM config, ebk enrich command, VFS web router, stale references.

Install / Upgrade

pip install --upgrade ebk
# With MCP support:
pip install --upgrade ebk[mcp]

Full Changelog

v0.4.4...v0.5.0

v0.4.0 - Views DSL

20 Dec 04:01

Choose a tag to compare

Major Feature: Views DSL

A SICP-inspired domain-specific language for defining composable, non-destructive views over your library.

Core Concepts

  • Primitives: all, none, filter, ids, view references
  • Combination: union, intersect, difference
  • Abstraction: Named views become new primitives
  • Closure: Combining views yields a view

CLI Commands

# Create views
ebk view create favorites --favorite
ebk view create programming --subject programming
ebk view create top-rated --rating-gte 4

# List and show views
ebk view list
ebk view show favorites

# Curate membership
ebk view add my-collection 42
ebk view remove my-collection 99

# Override metadata (non-destructive)
ebk view set my-view 42 --title "Better Title"
ebk view set my-view 42 --description "My notes"

# Import/export YAML
ebk view export my-view -o my-view.yaml
ebk view import my-view.yaml
ebk view edit my-view  # Opens in $EDITOR

Export Integration

ebk export html ~/library ~/output.html --view favorites
ebk export json ~/library ~/backup.json --view programming
ebk export csv ~/library ~/books.csv --view top-rated
ebk export opds ~/library ~/catalog.xml --view recent

Built-in Views

  • all - All books
  • favorites - Books marked as favorites
  • reading - Currently reading
  • completed - Finished books
  • unread - Not yet started
  • recent - Recently added
  • top-rated - Rating >= 4

YAML Definition Example

name: cs-fundamentals
description: Core CS texts, curated

select:
  intersect:
    - {filter: {subject: programming}}
    - {filter: {favorite: true}}

transform:
  override:
    42:
      title: "Structure and Interpretation of Computer Programs"
      description: "The wizard book. Start here."

order:
  by: title

v0.3.8

19 Dec 07:59

Choose a tag to compare

Changes

  • Fix VFS commands: use config default library and fix type error
    • VFS commands now accept -L/--library option instead of positional argument
    • VFS commands use config default library when not specified
    • Fixed TypeError where LibraryShell received Library object instead of Path

v0.3.7: CLI List Filters

18 Dec 01:36

Choose a tag to compare

New Features

CLI List Filters

Added new filter options to ebk list command:

  • --favorite / -f: Filter by favorite status
  • --status / -S: Filter by reading status (reading, completed, unread)

Examples

# List favorites
ebk list --favorite
ebk list -f

# Filter by reading status
ebk list --status reading      # Currently reading
ebk list --status completed    # Finished books
ebk list --status unread       # Not started

# Combine filters
ebk list --favorite --status reading
ebk list -f -a "Knuth"         # Favorite books by Knuth

Installation

pip install --upgrade ebk

v0.3.6: Web Interface Fixes & Reading Status Filters

02 Dec 20:25

Choose a tag to compare

Bug Fixes

  • Fixed JavaScript syntax error that prevented books from loading in web interface
    • Changed quote escaping from \' to ' HTML entities in onclick handlers

New Features

Reading Status Filter

  • Added reading_status parameter to /api/books endpoint
  • Filter books by: reading, completed, unread
  • Sidebar filters now work for "Currently Reading" and "Completed"

Extended Stats API

  • /api/stats now returns:
    • favorites_count: Number of favorited books
    • reading_count: Books currently being read
    • completed_count: Books marked as completed
  • Sidebar counts now display accurate numbers

Tests

  • Added 29 new tests for reading status filter, stats API, and JavaScript validation
  • Total test suite: 989 tests passing

Installation

pip install --upgrade ebk

v0.3.5: Extended Import/Export Support

02 Dec 06:12

Choose a tag to compare

New Features

Import Types

  • URL Import: Import ebooks directly from URLs (ebk import url)
  • OPDS Import: Import from OPDS catalog feeds (ebk import opds)
  • ISBN Import: Create book entries via Google Books/Open Library lookup (ebk import isbn)

Export Types

  • OPDS Export: Export library to OPDS catalog format (ebk export opds)

Web Interface (ebk serve)

  • 6-tab import modal: File, URL, Folder, Calibre, OPDS, ISBN
  • All import types accessible from the web UI

CLI/REST API Parity

All import types are now available in both the CLI and REST API.

New Files

  • ebk/calibre_import.py: Calibre library import helper
  • ebk/exports/opds_export.py: OPDS catalog export module

Testing

  • 54 comprehensive import tests
  • 71 comprehensive export tests
  • 125 new tests total

Installation

```bash
pip install --upgrade ebk
```

v0.3.4: OPDS Server, Reading Queue, Annotation Extraction

29 Nov 19:25

Choose a tag to compare

New Features

OPDS 1.2 Catalog Server

E-reader apps can now connect to your library! Works with Foliate, KOReader, Moon+ Reader, and more.

  • Browse by author, subject, language
  • Full search functionality with pagination
  • Cover images and direct file downloads
  • Start with: ebk serve
  • Connect at: http://localhost:9000/opds/

Reading Queue

Manage your "up next" reading list:

ebk queue add 42              # Add book to queue
ebk queue add 42 -p 1         # Add to top of queue
ebk queue list                # Show queue
ebk queue next                # Show next book
ebk queue move 42 3           # Reorder
ebk queue remove 42           # Remove from queue
ebk queue clear               # Clear entire queue

Annotation Extraction

Extract highlights and notes from your PDFs:

ebk note extract 42           # Extract annotations from book files
ebk note export 42            # Export as markdown
ebk note export 42 -f json    # Export as JSON

Improvements

  • Web server filters (favorite, rating) now work correctly with pagination
  • API returns proper total counts for filtered queries
  • All CLI commands support config default library path
  • Better error handling throughout

Testing

  • 91 new OPDS tests with 100% coverage
  • 839 total tests passing

v0.3.3: Comprehensive test improvements

18 Nov 10:11

Choose a tag to compare

This release focuses on significantly improving test coverage and quality through TDD best practices.

Test Coverage Improvements

  • search_parser.py: 44% → 98% coverage (+54 points)
  • vfs/resolver.py: 55% → 99% coverage (+44 points)
  • repl/shell.py: 56% → 64% coverage (+8 points)

New Test Suites

  • test_search_parser.py (83 tests, 1,026 lines)

    • Field-specific searches (title:Python, author:Knuth)
    • Boolean operators (AND, OR, NOT)
    • Comparison operators (rating:>=4, rating:3-5)
    • SQL generation and SQL injection protection
    • Edge cases and error handling
  • test_vfs_resolver.py (47 tests, 695 lines)

    • Path resolution (absolute, relative, special paths)
    • Parent directory navigation
    • Symlink resolution and tab completion
    • Edge cases and error handling
  • test_repl.py (35 additional tests)

    • Pipeline execution and chaining
    • Output redirection
    • Text processing commands
    • Error handling and validation

Test Quality Improvements

Refactored 12 brittle tests to focus on behavior, not implementation:

  • Removed __repr__ format tests → replaced with inspection tests
  • Refactored hash tests to focus on deduplication behavior
  • Refactored unique ID tests to focus on uniqueness guarantees
  • Refactored sort name tests to focus on ordering behavior
  • Replaced magic number assertions with calculated expectations
  • Replaced exact title assertions with ordering logic

Test Design Principles

All new and refactored tests follow TDD best practices:

  • Given-When-Then structure for clarity
  • Test behavior, not implementation - resilient to refactoring
  • Independent and isolated - can run in any order
  • Clear failure messages - easy debugging
  • Living documentation - tests explain what the system does

Results

  • Total tests: 662 passing (no regressions)
  • Coverage: 75%+ maintained on refactored modules
  • Test quality: All tests survive refactoring
  • New tests added: 165 comprehensive tests
  • Tests refactored: 12 tests improved for resilience

Benefits

  • Can now change hash algorithms without breaking tests
  • Can modify ID formats without test failures
  • Can improve sort algorithms freely
  • Tests serve as executable specifications
  • Fearless refactoring enabled

Installation

pip install ebk==0.3.3

Documentation

https://queelius.github.io/ebk/

v0.3.2: Project cleanup, test improvements, and new features

27 Oct 23:30

Choose a tag to compare

This release focuses on code organization, improved test coverage, and new features:

Project Cleanup

  • Reorganized documentation to /docs/development/
  • Moved utility scripts to /scripts/
  • Archived legacy code and obsolete requirements files
  • Updated .gitignore for better artifact management

Test Improvements

  • Improved library_db.py coverage: 56% → 82%
  • Improved vfs/nodes/books.py coverage: 42% → 82%
  • Added 18 new tests across multiple modules
  • Total: 497 passing tests

New Features

  • REPL shell implementation with find, grep, text utilities
  • Tag service with hierarchical navigation
  • VFS nodes for authors, books, subjects, tags
  • Similarity detection system
  • Database migrations support

Bug Fixes

  • Fixed MkDocs broken links
  • Cleaned up strict mode build warnings

Documentation

  • All design docs now in /docs/development/
  • New implementation summaries for tags, piping, shell
  • Clean mkdocs build in strict mode
  • Documentation site: https://queelius.github.io/ebk/