davidgasquez

markdown-fetch

Get URLs, PDFs and YouTube Videos as Markdown. Use to save tokens when reading websites (headings, lists, tables, links), YouTube URLs (transcripts) and PDFs (including stdin with -x or -m hints). If `markitdown` fails, fall back to `curl r.jina.ai/URL` or `defuddle.md/URL`.

davidgasquez 58 2 Updated 3mo ago
GitHub

Install

npx skillscat add davidgasquez/dotfiles/markdown-fetch

Install via the SkillsCat registry.

SKILL.md

Markdown Fetch

Fetch websites and URLs as Markdown. Use to save tokens when reading websites (headings, lists, tables, links), YouTube URLs (transcripts) and PDFs (including stdin with -x or -m hints). If markitdown fails, fall back to curl r.jina.ai/URL or defuddle.md/URL.

You have markitdown[pdf,youtube-transcription] installed.

Reading URLs

  1. Convert websites and URLs.

Web page to Markdown:

markitdown 'https://example.com' -o page.md

If MarkItDown fails on a URL, fall back to r.jina.ai or defuddle.md:

curl -fsSL 'https://r.jina.ai/https://example.com' > page.md
curl -fsSL 'https://defuddle.md/example.com' > page.md

YouTube URL to transcript Markdown:

markitdown 'https://www.youtube.com/watch?v=VIDEO_ID' -o video.md
  1. Convert PDFs.

Convert a file (stdout):

markitdown path/to/file.pdf

Write to a file:

markitdown path/to/file.pdf -o output.md

If reading from stdin, set hints so MarkItDown picks the PDF converter:

cat file | markitdown -x pdf
cat file | markitdown -m application/pdf