AnthoLume is a Progressive Web App (PWA) that manages your EPUB documents, provides an EPUB reader, and tracks your reading activity! It also has a KOReader KOSync compatible API, and a KOReader Plugin used to sync activity from your Kindle.
Go to file
2023-10-03 19:04:17 -04:00
api [add] heavy query caching, [add] wpm leaderboard 2023-10-03 19:04:17 -04:00
assets [add] settings (pw & time offset), [fix] PWA issues, [fix] misc styling issues 2023-09-27 19:14:02 -04:00
client [add] heavy query caching, [add] wpm leaderboard 2023-10-03 19:04:17 -04:00
config [add] settings (pw & time offset), [fix] PWA issues, [fix] misc styling issues 2023-09-27 19:14:02 -04:00
database [add] heavy query caching, [add] wpm leaderboard 2023-10-03 19:04:17 -04:00
graph [add] split wanted files vs wanted metadata for ko apis, [add] documentation 2023-09-19 19:29:55 -04:00
metadata [new] count words & stats, [new] refactor metadata, [new] human readable time 2023-10-01 19:50:52 -04:00
screenshots [add] docker instructions, [add] metadata gathering, [add] screenshots 2023-09-26 18:57:48 -04:00
scripts [add] editing, deletion, metadata recording 2023-09-24 20:12:12 -04:00
server [add] document view, [add] html sanitization, [add] google books metadata enrichment, [improve] db query performance 2023-09-22 22:12:36 -04:00
templates [add] heavy query caching, [add] wpm leaderboard 2023-10-03 19:04:17 -04:00
utils [add] heavy query caching, [add] wpm leaderboard 2023-10-03 19:04:17 -04:00
.envrc Initial Commit 2023-09-19 08:01:15 -04:00
.gitignore [add] split wanted files vs wanted metadata for ko apis, [add] documentation 2023-09-19 19:29:55 -04:00
.sqlfluff Initial Commit 2023-09-19 08:01:15 -04:00
docker-compose.yml [add] split wanted files vs wanted metadata for ko apis, [add] documentation 2023-09-19 19:29:55 -04:00
Dockerfile [add] docker instructions, [add] metadata gathering, [add] screenshots 2023-09-26 18:57:48 -04:00
go.mod [add] document view, [add] html sanitization, [add] google books metadata enrichment, [improve] db query performance 2023-09-22 22:12:36 -04:00
go.sum [add] document view, [add] html sanitization, [add] google books metadata enrichment, [improve] db query performance 2023-09-22 22:12:36 -04:00
LICENSE Initial Commit 2023-09-19 08:01:15 -04:00
main.go [add] document view, [add] html sanitization, [add] google books metadata enrichment, [improve] db query performance 2023-09-22 22:12:36 -04:00
Makefile [add] better docker tagging makefile 2023-09-26 19:44:20 -04:00
README.md [add] settings (pw & time offset), [fix] PWA issues, [fix] misc styling issues 2023-09-27 19:14:02 -04:00
shell.nix [add] editing, deletion, metadata recording 2023-09-24 20:12:12 -04:00
sqlc.yaml [new] count words & stats, [new] refactor metadata, [new] human readable time 2023-10-01 19:50:52 -04:00

Book Manager

--- WEB --- --- PWA ---


This is BookManager! Will probably be renamed at some point. This repository contains:

  • KOReader KOSync Compatible API
  • KOReader Plugin (See client subfolder)
  • WebApp

In additional to the compatible KOSync API's, we add:

  • Additional APIs to automatically upload reading statistics
  • Automatically upload documents to the server (can download in the "Documents" view)
  • Book metadata scraping (Thanks OpenLibrary & Google Books API)
  • No JavaScript! All information is generated server side.

Server

Docker Image: docker pull gitea.va.reichard.io/evan/bookmanager:latest

KOSync API

The KOSync compatible API endpoint is located at: http(s)://<SERVER>/api/ko

Quick Start

# Make Data Directory
mkdir -p bookmanager_data

# Run Server
docker run \
    -p 8585:8585 \
    -e REGISTRATION_ENABLED=true \
    -v ./bookmanager_data:/config \
    -v ./bookmanager_data:/data \
    gitea.va.reichard.io/evan/bookmanager:latest

The service is now accessible at: http://localhost:8585. I recommend registering an account and then disabling registration unless you expect more users.

Configuration

Environment Variable Default Value Description
DATABASE_TYPE SQLite Currently only "SQLite" is supported
DATABASE_NAME bbank The database name, or in SQLite's case, the filename
DATABASE_PASSWORD Currently not used. Placeholder for potential alternative DB support
CONFIG_PATH /config Directory where to store SQLite's DB
DATA_PATH /data Directory where to store the documents and cover metadata
LISTEN_PORT 8585 Port the server listens at
REGISTRATION_ENABLED false Whether to allow registration (applies to both WebApp & KOSync API)
COOKIE_SESSION_KEY Optional secret cookie session key (auto generated if not provided)

Client (KOReader Plugin)

See documentation in the client subfolder: SyncNinja

Development

SQLC Generation (v1.21.0):

go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
~/go/bin/sqlc generate

Run Development:

CONFIG_PATH=./data DATA_PATH=./data go run main.go serve

Building

The Dockerfile and Makefile contain the build information:

# Build Local Docker Image
make docker_build_local

# Push Latest
make docker_build_release_latest

If manually building, you must enable CGO:

# Download Dependencies
go mod download

# Compile (Binary `./bookmanager`)
CGO_ENABLED=1 CGO_CFLAGS="-D_LARGEFILE64_SOURCE" go build -o /bookmanager

Notes