|
|
15 órája | |
|---|---|---|
| .. | ||
| README.md | 15 órája | |
Convert articles on the website (v1.2.0)
rekopub-web (cmd/rekopub-web, internal/web): a small server on
127.0.0.1:8004, run as goapp@rekopub-web behind nginx. For each
conversion it runs the rekopub command as a separate process, saves the
books in a new folder with a random name and serves them from
/books/<folder>/<file>. Books are deleted after 24 hours./etc/goapps/rekopub-web.env:
-LOCAL (CLI change): local and private
addresses are refused by default. A local -URL without the flag stops
with "-URL … is on this computer or a private network; add -LOCAL to
convert it" (exit code 2), before anything is downloaded. Before this,
rekopub -URL http://localtest.me:3000/ turned the server's own Gogs page
into a book. The website never passes -LOCAL, and also checks the
address itself before running anything. People who convert pages on
their own network need to add -LOCAL from this version on.-LOCAL.deploy/: the nginx site file and an example settings file.VERSION 1.2.0../cmd/rekopub-web and a server rekopub
into /opt/apps/rekopub-web/ and restarts goapp@rekopub-web before
publishing the site./opt/apps/rekopub-web/data/, /etc/goapps/rekopub-web.env with
PORT=8004, the new nginx site file.go vet ./..., go test ./... and go test -race ./internal/web.-LOCAL (with the real pipeline: a localhost page is refused
without it, before any request, and converted with it),
and the server: form checks, local addresses, both limits, busy, storage
limit, failed conversions, unexpected output paths, link expiry and
path tricks on /books/, deleting old books, HTML answers (escaped),
cross-site posts, visitor keys for IPv4/IPv6, and the real process
runner with a stand-in script.rekopub and rekopub-web
behind nginx with this PR's server block (without TLS). Converted real
pages to EPUB, KEPUB and both, downloaded them, and checked: local
addresses refused (localtest.me, 127.0.0.1, [::1]), the per-visitor
limit, nginx's 429, five conversions sent at once (two at a time, each in
its own folder), and the page in its normal, finished and paused states.