Url2pdf

Convert URL to PDF suitable for mobile reading.

johnalbertini14-glitch Updated 1 repo stars

File contents

URL to PDF

Given a url for a webpage, convert it to pdf suitable for mobile reading.

See examples.

Requirements

  • uv

Installation

playwright itself will be installed by uv automatically, while it also needs browser to be installed:

uvx playwright install chromium

Usage

uv run --script ${baseDir}/url2pdf.py "${url}"

Path to pdf will be printed to stdout.

Agent Instructions

  1. Run the script: Pass the url to be converted as an argument.
  2. Handle Output: The script will output a path to a pdf file. Use the message tool to send the pdf file to the user as a document message:
{
   "action": "send",
   "filePath": "<filepath>"
}

johnalbertini14-glitch/openclaw-skills/tree/main/skills/guoqiao/url2pdf commit b2cdd78e23

Frequently asked questions

npx skillmds@latest add johnalbertini14-glitch/url2pdf