mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-08-18 02:23:55 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user