跳到主要内容
哒哒星球DADA PLANET

Skill · 已公开版本

defuddle · 把网页正文存成 Markdown

从网页 HTML 提取正文和标题,存成便于阅读、检索的 Markdown,减少导航和广告干扰。

先看看示例

作者提供的示例,实际效果取决于你的输入和使用工具。

输入

示例文章 https://example.com/guide,作者已知为示例团队;输出 notes/guide.md;真实使用时替换 URL。

输出

编辑示例 · 未运行

defuddle parse https://example.com/guide --md -o notes/guide.md

归档文件开头示意:

# 一次把周报写清楚
来源:https://example.com/guide
作者:示例团队

先写本周完成的结果,再说明仍受阻的事项和下一步。

提取后核对:标题、正文结尾、代码和图片说明是否缺失;该片段为编辑样例,不是已抓取结果。

方法说明

---
name: defuddle
description: Extract clean Markdown from HTML pages with Defuddle CLI.
---

# Defuddle

Use Defuddle CLI to extract clean readable content from web pages. Prefer over WebFetch for standard web pages — it removes navigation, ads, and clutter, reducing token usage.

If not installed: `npm install -g defuddle`

## Usage

Always use `--md` for markdown output:

```bash
defuddle parse <url> --md
```

Save to file:

```bash
defuddle parse <url> --md -o content.md
```

Extract specific metadata:

```bash
defuddle parse <url> -p title
defuddle parse <url> -p description
defuddle parse <url> -p domain
```

## Output formats

| Flag | Format |
|------|--------|
| `--md` | Markdown (default choice) |
| `--json` | JSON with both HTML and markdown |
| (none) | HTML |
| `-p <name>` | Specific metadata property |