polka

command module
v0.0.0-...-f8a28ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

polka

polka is a self-hosted, managed ebook library for one person or a household.

Add books, find them quickly, fix metadata when it matters, and read, open, or download them from a browser. Like calibre, polka owns the library for you: books come in through import or upload, metadata lives in SQLite, and files are kept in a clean, predictable layout on disk, so you can still read, copy, and back them up directly.

It is opinionated but tries to stay out of the way: sensible defaults, few settings, and no sense that running a library has become a second job. It is not trying to replace calibre's desktop workbench — converters, plugins, custom columns — or grow into a large media platform. It is a quieter, lower-maintenance home for your books.

What you can do

  • Add books from the command line, by uploading or dragging them into the browser, from a folder already mounted on the server, or by dropping files into an incoming folder.
  • Find them with fast search, shelves, saved searches, series pages, and genres and tags. Search stays fast at tens of thousands of books.
  • Fix metadata and covers when you care to. Books are usable immediately, and the details can improve later — one at a time, in bulk, or with suggestions fetched from Open Library and Google Books (only when you ask).
  • Read in the browser with your place remembered. Search within books and save highlights and notes you can export. Connect reading apps and devices through OPDS, KOReader or Kobo sync.
  • Send books to a device by email — Kindle and PocketBook presets, or any address — converting on the way when the device needs a different format.

Formats

polka imports EPUB, FB2, PDF, Kindle formats (MOBI, AZW, AZW3, AZW4, KFX), comic archives (CBZ, CBR, CB7), DjVu, TXT, Markdown, HTML, DOCX, ODT, RTF, and CHM. Conversion is built in, with no external tools.

For a household

polka works for one person with no sharing workflow in the way, and scales to a few people without much ceremony. Everyone shares the same catalog, while reading position, personal shelves, and preferences stay personal. You can also give someone an account that only sees the shelves you choose.

Quick start

polka import ~/books --data ./library
polka serve --data ./library --addr 127.0.0.1:8080

import creates the library on first run. You can also start with serve and add books from the browser. Open http://127.0.0.1:8080; the first run shows a one-time setup page for the first account, which becomes the administrator. From there, add books and invite the rest of the household.

The user guide lives in docs/guide.md.

Status

polka works and is used daily, but is still at an early stage. Expect changes, and keep independent backups of your books and library data.

Development

For development, make serve builds and starts a local library with account auth enabled; make help lists the rest.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
appsettings
Package appsettings reads and writes settings through caller-supplied SQL handles.
Package appsettings reads and writes settings through caller-supplied SQL handles.
cli
comicarchive
Package comicarchive owns RAR index and decoder access shared by comic inspection and conversion paths.
Package comicarchive owns RAR index and decoder access shared by comic inspection and conversion paths.
covers
Package covers owns cover image post-processing and filesystem conventions.
Package covers owns cover image post-processing and filesystem conventions.
css
Package css reads CSS syntax without discarding source bytes.
Package css reads CSS syntax without discarding source bytes.
db
Package db owns Polka's persisted catalog operations and the entity invariants that must hold for every caller.
Package db owns Polka's persisted catalog operations and the entity invariants that must hold for every caller.
epubtest
Package epubtest provides independent output checks for converter tests and the private corpus.
Package epubtest provides independent output checks for converter tests and the private corpus.
format/djvu
Package djvu hosts DjVuTang for metadata extraction and server covers.
Package djvu hosts DjVuTang for metadata extraction and server covers.
format/djvu/wasmtool command
Prepare the pinned DjVuTang WASM.
Prepare the pinned DjVuTang WASM.
format/kfx
Package kfx reads unencrypted KFX book containers and explicit ZIP bundles.
Package kfx reads unencrypted KFX book containers and explicit ZIP bundles.
format/mobi
Package mobi reads PalmDB ebooks: PalmDOC, MOBI6, KF8 and AZW4 Print Replica.
Package mobi reads PalmDB ebooks: PalmDOC, MOBI6, KF8 and AZW4 Print Replica.
format/pdf
Package pdf reads PDF metadata and page counts and renders covers.
Package pdf reads PDF metadata and page counts and renders covers.
format/pdf/wasmtool command
pdfium-wasm verifies and regenerates Polka's tailored PDFium WebAssembly module.
pdfium-wasm verifies and regenerates Polka's tailored PDFium WebAssembly module.
imagecodec
Package imagecodec owns shared raster decoders and SVG resource preparation used by format inspection, conversion and cover processing.
Package imagecodec owns shared raster decoders and SVG resource preparation used by format inspection, conversion and cover processing.
importer
Package importer prepares and imports books for CLI, uploads, folder imports, and Incoming, sharing metadata extraction, duplicate handling, and persistence.
Package importer prepares and imports books for CLI, uploads, folder imports, and Incoming, sharing metadata extraction, duplicate handling, and persistence.
kobo
Package kobo contains Polka's small, independent Kobo wire adapter.
Package kobo contains Polka's small, independent Kobo wire adapter.
relayout
Package relayout owns the shared sequencing for book-metadata mutations whose path inputs may change: commit catalog/search bookkeeping first, then move files to their canonical paths while keeping DB and disk consistent.
Package relayout owns the shared sequencing for book-metadata mutations whose path inputs may change: commit catalog/search bookkeeping first, then move files to their canonical paths while keeping DB and disk consistent.
storage
Package storage owns low-level filesystem mutations inside a polka managed storage root.
Package storage owns low-level filesystem mutations inside a polka managed storage root.
testfixture
Package testfixture contains tiny, freely redistributable binary fixtures shared by tests in more than one internal package.
Package testfixture contains tiny, freely redistributable binary fixtures shared by tests in more than one internal package.
web

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL