BookshelfReader.Core 1.0.2

dotnet add package BookshelfReader.Core --version 1.0.2
                    
NuGet\Install-Package BookshelfReader.Core -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BookshelfReader.Core" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BookshelfReader.Core" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="BookshelfReader.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BookshelfReader.Core --version 1.0.2
                    
#r "nuget: BookshelfReader.Core, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BookshelfReader.Core@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BookshelfReader.Core&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=BookshelfReader.Core&version=1.0.2
                    
Install as a Cake Tool

BookshelfReader

BookshelfReader provides dependency injection helpers for wiring the bookshelf parsing pipeline (segmentation, OCR, parsing, genre classification, and Open Library lookup) into an existing ASP.NET Core application. Use the NuGet package; you do not need to run the included API host by itself. A runnable reference host lives in BookshelfReader.Host for local testing only and is not packaged. Only the BookshelfReader.Extensions and BookshelfReader.Api projects are marked packable so dotnet pack emits just the NuGet payloads.

Consuming the NuGet package

  1. Reference the BookshelfReader.Extensions package (and BookshelfReader.Api if you want the prebuilt endpoint mappings) from your ASP.NET Core project.
  2. In Program.cs add:
    using BookshelfReader.Api.Extensions;
    using BookshelfReader.Extensions;
    using BookshelfReader.Extensions.Authentication;
    
    builder.Services.AddBookshelfReader(builder.Configuration);
    
    builder.Services
        .AddAuthentication(options =>
        {
            options.DefaultScheme = ApiKeyAuthenticationDefaults.AuthenticationScheme;
            options.DefaultAuthenticateScheme = ApiKeyAuthenticationDefaults.AuthenticationScheme;
            options.DefaultChallengeScheme = ApiKeyAuthenticationDefaults.AuthenticationScheme;
        })
        .AddBookshelfReaderApiKey();
    
    builder.Services.AddAuthorization();
    builder.Services.AddBookshelfReaderRateLimiting(builder.Configuration);
    
    app.UseRateLimiter();
    app.MapBookshelfReaderApi();
    
  3. Provide configuration values (environment variables or appsettings.json):
    • Authentication:ApiKey: HeaderName (default X-API-Key), RequireApiKey, and ValidKeys.
    • RateLimiting:Parse: Enabled (default false), PermitLimit (default 10), and WindowSeconds (default 60). Enabling this policy also requires builder.Services.AddBookshelfReaderRateLimiting(builder.Configuration); during service registration and app.UseRateLimiter(); before mapping the API endpoints.
    • Uploads: MaxBytes (1–20 MB) and AllowedContentTypes (JPEG/PNG).
    • Enrichment: Enabled (default true), MaxConcurrentLookups (1–16, default 4), and MinMatchScore (0–100, default 55). When enabled, /api/bookshelf/parse looks up each parsed title against Open Library and attaches the best match (title, author, year, ISBN, cover URL, subjects) to the candidate's metadata field, so callers get display-ready results from a single request.
    • Optional: OpenLibrary:BaseUrl (must be HTTPS), OpenLibrary:UserAgent (sent to Open Library; defaults to a BookshelfReader identifier), Ocr:Tesseract, Segmentation, and Parsing settings.

Embedders must provide OCR language data by placing eng.traineddata (or the languages they configure) in a tessdata directory and pointing Ocr:Tesseract:DataPath at it. BookshelfReader.Host downloads eng.traineddata from the tessdata_fast repository automatically on first build, but package consumers need to provision that folder themselves.

Packing for nuget.org (testing)

dotnet restore
dotnet pack BookshelfReader.Extensions/BookshelfReader.Extensions.csproj \
  -c Release \
  -p:PackageVersion=1.0.0-beta1 \
  -p:IncludeSymbols=true \
  -p:SymbolPackageFormat=snupkg
dotnet pack BookshelfReader.Api/BookshelfReader.Api.csproj \
  -c Release \
  -p:PackageVersion=1.0.0-beta1 \
  -p:IncludeSymbols=true \
  -p:SymbolPackageFormat=snupkg
# Equivalent solution-wide pack (only the packable projects emit packages)
# dotnet pack BookshelfReader.sln -c Release

Publish the resulting .nupkg (and optional .snupkg) artifacts from BookshelfReader.Extensions (and optionally BookshelfReader.Api for the endpoint mappings) to nuget.org with your API key. Mark prerelease versions with a suffix such as -beta1.

Tests

dotnet test

Tests cover the DI wiring, option validation, and pipeline components to ensure the NuGet surface behaves as expected.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on BookshelfReader.Core:

Package Downloads
BookshelfReader.Infrastructure

Concrete BookshelfReader pipeline implementations: OpenCV segmentation, Tesseract OCR, spine parsing, genre classification, and Open Library lookup with metadata enrichment. Pulls in Windows-only native dependencies (OpenCvSharp4.Windows, Tesseract).

BookshelfReader.Extensions

Dependency-injection helpers for the BookshelfReader pipeline. Call AddBookshelfReader() to wire upload validation, segmentation, OCR, parsing, genre classification, and Open Library enrichment into an ASP.NET Core app, plus optional API-key auth and parse rate limiting.

BookshelfReader.Api

Endpoint-mapping helpers for the BookshelfReader pipeline. Call MapBookshelfReaderApi() to expose the /api/bookshelf/parse and /api/books/lookup endpoints from an ASP.NET Core app.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 162 6/11/2026
1.0.1 155 6/11/2026
1.0.0 161 6/11/2026