Skip to content

dmd/amber

Repository files navigation

AMBER

Access Method for Bibliographic Electronic Records — a Dynix-style terminal search for the local LibraryThing (JSON export) and Calibre databases.

Catalog files live in ./data/, e.g. in my case:

  • data/librarything_*.json — LibraryThing JSON export (loaded by default)
  • data/metadata-dmd.db as DANIEL in the format/library column
  • data/metadata-cad.db as CELESTE in the format/library column

Use --no-ebooks to search only the LibraryThing export, or --ebook-db NAME=PATH to add another Calibre metadata database. Override the catalog path with --catalog PATH.

Local TUI

./amber.py
./amber.py --theme green
./amber.py --check
./amber.py --no-ebooks

Telnet Server

Start the local telnet bridge:

./amber_telnet.py --host 127.0.0.1 --port 2323

Connect locally from another terminal:

telnet 127.0.0.1 2323

Public TCP Tunnel

With the telnet server running locally, expose it through ngrok:

ngrok tcp 2323

Ngrok prints a forwarding address like tcp://0.tcp.ngrok.io:12345. Connect to it with:

telnet 0.tcp.ngrok.io 12345

The telnet server binds to localhost by default. Use --host 0.0.0.0 only when you explicitly want it reachable on the local network without a tunnel.

Web Terminal

Build and run the Docker image. The catalog is not baked into the image — mount ./data as a read-only volume at /app/data:

docker build -t amber-web .
docker run --rm -p 2380:2380 -v "$PWD/data:/app/data:ro" amber-web

Or via compose (the volume mount is already wired up):

docker compose up --build

Open:

http://localhost:2380/

The browser UI is an 80x25 xterm.js terminal connected to the same AMBER curses app over a WebSocket PTY bridge.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors