A simple tool to take chapters from Wuxia and make ePub with them for convenient and offline reading.
The main issue I had with Wuxia it that I can only read on the web or with the iOS app. The iOS app is great, but I want to use the kindle as it's the perfect size between my iPhone and iPad Pro. Plus the e-ink screen is much better.
So this is how I started this small project.
For now, it's 'Wuxia' to 'Kindle' because this is the only usecase I have. It's not impossible that I extend the features and integrations in the future.
The boost
directory simply contains 2 files (boost.js and boost.css).
These files are the content of would be a boost integration in Arc Browser.
It's basically the same thing as an browser extension, but I don't have to deal with building, packaging and shipping. I just copy/paste code in my browser.
The (backend) app is seperated in 2 commands:
- ingest: HTTP server that exposes the ingest API
- worker: Long running process that polls for exports to be made and process them
The ingest receives chapters from the boost script and put them in the (postgres) DB. There are some more CRUD endpoints for the client later.
The worker(s ?) queries the DB to get unprocessed exports and start processing them:
- merging text for requested chapters
- creating the ePub
- sending it by mail to the
@kindle.com
mail
The client is (for now nothing) a simple tool to help manage the content of the DB:
- add covers to books
- manage chapters
- create new exports
Requires devenv
Requires sqlx-cli
In one terminal:
# Starts the postgres DB, and should use the `schema.sql` file to prepare it. If not, bummer.
$> devenv up
In another one:
# Runs the DB migrations
$> sqlx migrate run -D postgres://localhost:5433/wuxia2kindle
At this point the DB should be ready with the most up to date schema.
To start the ingest
service:
$> cargo run -- ingest -p 3000 --database-url postgres://localhost:5433/wuxia2kindle
To start the worker
service:
$> cargo run -- worker --database-url postgres://localhost:5433/wuxia2kindle --smtp-server "127.0.0.1" --smtp-port 1025 --smtp-user "[email protected]" -smtp-password "your_secure_passwd" --send-to "[email protected]"
To start the client:
$> deno task start