url-readmode-markdown
Convert a web URL into reader-mode Markdown and save it as a .md file named after the content's topic/title. Use for tasks like extracting article text, cleaning noisy pages, and producing a readable Markdown file from a URL.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
Url Readmode Markdown
Overview
Extract the primary article content from a URL using reader-mode heuristics and save it as Markdown. The output filename should be the content topic/title (sanitized for filenames).
Quick Start (scripted)
- Prefer the provided script:
scripts/extract_readmode.js - Use
@mozilla/readability+jsdom+turndown. - The script prints the output path after writing the Markdown file.
Example:
node scripts/extract_readmode.js \"https://example.com/article\" -o .
Dependencies (Node):
-
npm install @mozilla/readability jsdom turndown
Workflow (manual or scripted)
- Collect the target URL and verify it is article-like content.
- Extract the main content container using reader-mode heuristics.
- Convert cleaned HTML to Markdown while preserving headings, lists, and images.
- Set the output filename to the content topic/title (sanitize invalid filename characters).
- Review the Markdown for missing sections or noisy blocks and trim as needed.
Reader-Mode Heuristics
For extraction guidance, use references/readmode.md as the heuristic summary.
Output Requirements
- Output: a single Markdown file containing the main article content.
- Filename: use the article/topic title; sanitize disallowed filename characters; replace spaces with
_; keep the original language if possible. - Place output in the user-specified directory or the current working directory by default.
Resources
scripts/
scripts/extract_readmode.js extracts reader-mode content from a URL and saves Markdown.
references/
references/readmode.md summarizes reader-mode heuristics for fallback/manual extraction.
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-01-26
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!