- Project structure
- DB-Schema
- JSON Readonly API
- RSS generation
- CLI import of m4b files
- JSON Update/Write API
- Web frontend
You'll need rust nightly.
- Install rustup:
curl https://sh.rustup.rs -sSf > rustup.sh
sh rustup.sh
- Switch to rust nightly:
rustup install nightly
rustup default nightly
- Install
diesel_cli
(You need sqlite development headers installed)
cargo install diesel_cli --no-default-features --features "sqlite"
- Migrate the DB
diesel migration --database-url ./data/db.sqlite run
- Build
cargo build
Place a configuration file in the format of your liking in one of these places:
~/.config/bookrss.{toml,json,yaml}
~/.bookrss.{toml,json,yaml}
/etc/bookrss.{toml,json,yaml}
Example config in toml format:
[server]
workers = 4
log = "normal"
template_dir = "./templates/"
address = "127.0.0.1"
port = 8000
secret_key = "<secret_key>"
[database]
url = "./data/db.sqlite"
[path]
data_path = "./data/"
external_url = "http://127.0.0.1:8000"
[audible]
activation_bytes = "<audible_activation_bytes_hex>"
[server.limits]
forms = 32768
- To generate a secret key use the following command:
openssl rand -base64 32
- To fetch your audible activation bytes see https://github.com/pkillnine/audible-activator-robobrowser
You may skip the [audible]
section if you do not plan to import aax
or aa
files.
Run via: cargo run --bin bookrss -- import --series "<series_name>" --part <book_number> <audio_file>
If the series only has one part (so it is not really a series) you may skip the --part
. If your audio book is split into multiple audio files, use the -x
flag and import them in the right order.
Run via: cargo run --bin bookrssd
GET /audiobooks?<query>
Fetch a list of audio books. Available filters:author_id
series_id
speaker_id
translation
GET /audiobooks
Fetch a list of all audio booksGET /audiobook/<id>
Fetch audio book by id
GET /authors?<query>
Fetch a list of authors. Available filters:language
GET /authors
Fetch a list of all authorsGET /author/<id>
Fetch author by id
GET /speakers?<query>
Fetch a list of speakers. Available filters:language
GET /speakers
Fetch a list of all speakersGET /speaker/<id>
Fetch speaker by id
GET /series?<query>
Fetch a list of all book series. Available filters:author_id
translation
GET /series
Fetch a list of all book seriesGET /series/<id>
Fetch a book series by id
GET /parts/<audiobook_id>
Fetch a list of parts that belong to the audio book with the idGET /part/<id>
Fetch the actual binary file that contains the part
GET /cover/<part_id>.jpg
Fetch a podcast cover art image
GET /series_rss/<slug>
Fetch a podcast feed for a seriesGET /audiobook_rss/<slug>
Fetch a podcast feed for a single book