{"id":23301502,"url":"https://github.com/lacop/udrb","last_synced_at":"2026-05-19T07:32:49.072Z","repository":{"id":38331189,"uuid":"176005437","full_name":"lacop/udrb","owner":"lacop","description":"Universal Document Render Bot - Slack /slash command to render requested pages as PDFs and post the download link back to the channel","archived":false,"fork":false,"pushed_at":"2024-04-05T16:24:15.000Z","size":203,"stargazers_count":0,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-07T13:39:19.969Z","etag":null,"topics":["headless-chrome","pdf-generation","rust","slack","slack-webhook"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lacop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-16T17:52:24.000Z","updated_at":"2024-02-18T15:42:00.000Z","dependencies_parsed_at":"2025-02-14T12:16:49.428Z","dependency_job_id":null,"html_url":"https://github.com/lacop/udrb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lacop/udrb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacop%2Fudrb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacop%2Fudrb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacop%2Fudrb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacop%2Fudrb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lacop","download_url":"https://codeload.github.com/lacop/udrb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacop%2Fudrb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33206320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:16:55.748Z","status":"ssl_error","status_checked_at":"2026-05-19T07:16:54.366Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["headless-chrome","pdf-generation","rust","slack","slack-webhook"],"created_at":"2024-12-20T10:13:40.511Z","updated_at":"2026-05-19T07:32:49.055Z","avatar_url":"https://github.com/lacop.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Universal Document Render Bot\n\nSlack slash command that allows users to capture a URL and post a screenshot, PDF and MHTML archive of the page.\n\n## Slack configuration\n\n* Create new app\n* Get the \"Signing secret\" and set it in the `.env` file\n* Add a \"Slash command\" called `/udrb` with request url `https://hostname/slack/slash`, and some description and usage hint.\n* In \"Interactivity \u0026 Shortcuts\" enable \"Interactivity and add a new \"Request URL\" `https://hostname/slack/interactive`.\n\n## Deploy \u0026 run\n\nOptionally build the image locally, or wait for github actions to rebuild. Building on the VPS is painfully slow.\n\n```shell\n$ (cd app/ \u0026\u0026 docker build -t ghcr.io/lacop/udrb-app . \u0026\u0026 docker push ghcr.io/lacop/udrb-app)\n$ (cd browser/ \u0026\u0026 docker build -t ghcr.io/lacop/udrb-chrome . \u0026\u0026 docker push ghcr.io/lacop/udrb-chrome)\n```\n\nOn remote host, update the repo and images:\n\n```shell\n# First time: git clone git@github.com:lacop/udrb.git\n$ cd udrb\n$ git pull origin master\n\n# Fast\n$ sudo docker compose pull\n\n# Slow\n$ sudo docker compose build \n```\n\nCopy over config, if it has changed:\n\n```shell\n$ scp config/.env lacop@lacop.dev:udrb/config/\n$ scp config/domains.yaml lacop@lacop.dev:udrb/config/\n```\n\nLaunch on remote:\n\n```shell\n# Stop if running already\n$ sudo docker compose down -v\n$ sudo docker compose up -d\n```\n\n## Local development\n\n### Full Docker\n\n```shell\n# Set up reverse SSH tunel to the host configured for slash command (remote 2102 -\u003e local 2101)\n$ ssh -N -T -R2102:localhost:2101 lacop.dev\n\n# Run local version.\n# TODO change to env file/args to allow overriding stuff here\n$ docker compose build \u0026\u0026 docker compose up\n```\n\n### Faster Rust iteration\n\n```shell\n# Start chrome container\n$ cd browser/\n$ docker run -d -p 9222:9222 $(docker build -q .)\n\n# Run the server\n$ cd app/\n$ ROCKET_PORT=2101 UDRB_OUTPUT_DIR=$PWD/../output UDRB_HOSTNAME=http://udrb-dev.lacop.dev UDRB_CHROME_ADDRESS=127.0.0.1:9222 UDRB_DOMAIN_CONFIG=../config/domains.yaml UDRB_SLACK_MAX_AGE_SECONDS=300 UDRB_SLACK_SECRET=... cargo run\n```\n\n## TODO\n\n* More robust handling of chromium hanging - timeouts etc.\n* Add `Referrer-Policy: no-referrer` to the `/static` handler.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacop%2Fudrb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flacop%2Fudrb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacop%2Fudrb/lists"}