Something went wrong. Try again.
Something went wrong. Try again.
Files
Verified signature Signed by quine.de SHA256:9AVhYNFEnyVditQoYqfFe5OarTRpHYKe41zab2AohLw Click to copy SHA
Verified signature Signed by quine.de SHA256:9AVhYNFEnyVditQoYqfFe5OarTRpHYKe41zab2AohLw Click to copy SHA
Verified signature Signed by quine.de SHA256:9AVhYNFEnyVditQoYqfFe5OarTRpHYKe41zab2AohLw Click to copy SHA
main Default
- Python 66%
- Jinja-like 23%
- Nix 11%
- HTML <1%
README.md
Bücherlotse #
Search the audiobooks and e-books of the eBücherhalle Hamburg (elibraryhh.overdrive.com) by type, language, availability and category. For a given reader's age, Mistral suggests a minimum age per title on the current page; the app compares it with the age. Ratings are cached per book for six months; cover images are cached server-side for 30 days (the CDN URLs are stable per book).
Layout (ports & adapters, enforced by tests/test_architecture.py with pytest-archon):
buecherlotse/domain– model and ports (Catalog,AgeRater), no outside importsbuecherlotse/application–BookSearchuse case, depends only on the domainbuecherlotse/adaptersoverdrive– catalog search and allowlisted cover fetchingmistral– minimum-age rating, one isolated request per bookcache– SQLite caches in front of theAgeRater(ratings) and theCatalog(cover images)web– Flask UI, cover proxy, Impressum and Datenschutz pages (templates/)
buecherlotse/main.py– composition root (configured viaMISTRAL_API_KEY,MISTRAL_MODEL,CACHE_PATH,IMPRINT_NAME,IMPRINT_ADDRESS,IMPRINT_EMAIL)
Develop #
nix develop -c pytest
MISTRAL_API_KEY=... nix run . # http://127.0.0.1:8080, override with BIND=host:port
Deploy (NixOS) #
{
inputs.buecherlotse.url = "git+https://.../buecherlotse";
# in your nixosSystem modules:
imports = [ inputs.buecherlotse.nixosModules.default ];
services.buecherlotse = {
enable = true;
bind = "127.0.0.1:8080";
environmentFile = "/run/secrets/buecherlotse.env"; # MISTRAL_API_KEY=...
imprint = { name = "Erika Musterfrau"; address = "Musterstraße 1, 20095 Hamburg"; email = "kontakt@example.org"; };
};
}