feat(monkeyd): export monkeydd.com novels as PDF via /monkeyd_crawl

Add the monkeyd module, which crawls a novel and sends the rendered PDF back
as a Telegram document. Crawling and rendering come from the monkeyd-crawler
submodule, resolved through a go.mod replace directive.

The command is admin-only and restricted to monkeydd.com: one run makes
hundreds of outbound requests over minutes, and the extractor only understands
that site. Exports run one at a time and on a detached goroutine, because
handlers are dispatched synchronously and an inline crawl would block every
other command.

The runtime image gains DejaVuSans; font discovery probes system paths and the
distroless base ships none, so PDF rendering would otherwise fail in
production. CI checks out submodules and the builder copies the submodule
go.mod before go mod download, which needs it to resolve the build list.
This commit is contained in:
2026-07-29 23:07:23 +07:00
parent 126485c3cc
commit e05b0f5be0
15 changed files with 903 additions and 19 deletions
+5
View File
@@ -16,7 +16,12 @@ jobs:
matrix:
go: ['1.26.5']
steps:
# The monkeyd module builds against third_party/monkeyd-crawler, which is
# a submodule wired in through a go.mod replace directive. Without it
# checked out, every Go step fails to resolve the package.
- uses: actions/checkout@v6
with:
submodules: true
- uses: actions/setup-go@v6
with: