little-hesinde/README.md

94 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2024-05-10 15:31:27 +00:00
# Little Hesinde
2024-05-10 13:05:56 +00:00
I have been a long time user of [cops](https://github.com/seblucas/cops) and its
[fork](https://github.com/mikespub-org/seblucas-cops) in order to access my
ebook collection in a nice way from a browser. My biggest use always has been
the [ODPS](https://en.wikipedia.org/wiki/Open_Publication_Distribution_System)
feed for getting all of that from within [KOReader](https://koreader.rocks/).
It so happened that exactly when I was looking for a small side project I also
had trouble with a new cops version (not through their fault, only because I
insist on writing my own containers). _How hard can it be_ I thought and went on
hacking something together. The result does at most one tenth of what cops can
do but luckily enough it is the part I need for myself.
2024-05-11 07:30:30 +00:00
![Screenshot](screenshot.jpg)
2024-05-11 06:18:49 +00:00
2024-05-10 13:05:56 +00:00
# Building
## Nix
A [nix](https://nixos.org/download/) environment with enabled
[nix-commands](https://nixos.wiki/wiki/Flakes) in order to use `nix develop`.
2024-05-10 13:05:56 +00:00
Run `nix develop` to be dropped into a shell with everything installed and
configured. From there all the usual `cargo` commands are accessible.
2024-05-10 13:05:56 +00:00
## Classic
A recent [rust](https://www.rust-lang.org/learn/get-started) installation is all
that is needed.
From there on `cargo run` and `cargo build` and so on can be used.
# Configuration
2024-06-26 06:06:48 +00:00
```
Usage: little-hesinde [OPTIONS] -- <LIBRARY_PATH>
2024-05-10 13:05:56 +00:00
2024-06-26 06:06:48 +00:00
Arguments:
2024-06-26 20:35:03 +00:00
<LIBRARY_PATH> Calibre library path [env: LIBRARY_PATH=]
2024-06-26 06:06:48 +00:00
Options:
2024-06-26 20:35:03 +00:00
-l, --listen-address <LISTEN_ADDRESS>
Address to listen on [env: LISTEN_ADDRESS=] [default: [::1]:3000]
-c, --cache-path <CACHE_PATH>
Cache path ($TMP cascades through $XDG_CACHE_HOME, $TMPDIR and /tmp) [env: CACHE_PATH=] [default: $TMP/little-hesinde]
-h, --help
Print help
-V, --version
Print version
2024-06-26 06:06:48 +00:00
```
Example: `little-hesinde -l [::]4000 -- ~/Documents/library/`
2024-05-10 13:05:56 +00:00
# Usage
Run the binary with the calibre library as an argument and open
http://localhost:3000 (or wherever it should be accessible).
http://localhost:3000/opds is the entry point for the OPDS feed.
# FAQ
## No authentication?
Not planned, put a reverse proxy in front of it that handles access.
2024-06-26 11:53:00 +00:00
## How do I search?
2024-05-10 13:05:56 +00:00
2024-06-26 11:53:00 +00:00
Putting in your search text and you are done. Searching is done on title, tags,
author, series title, identifiers and comments.
For more sophisticated queries take a look at the
[fts5 documentation](https://www.sqlite.org/fts5.html#full_text_query_syntax).
2024-05-10 13:05:56 +00:00
## Why are the OPDS entries not paginated?
My hardware (a Kobo Aura One from ~2016) with KOReader works perfectly fine with
2024-05-11 05:50:08 +00:00
parsing the 1MB book feed from my own library. Once that changes I might get
over my laziness and implement it.
2024-05-10 13:05:56 +00:00
## Aren't these database access patterns inefficient?
They most probably are but my elaborate testing setup (my own calibre library)
works fine with it.
## Why rust?
I like the language and wanted to try the
[poem](https://github.com/poem-web/poem) framework.
## Is it webscale?
Go away.