convert-to-markdown
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWeb-to-Markdown via EzyCopy
通过EzyCopy实现网页转Markdown
Extract clean markdown from any URL using the CLI.
ezycopy使用 CLI从任意URL提取干净的markdown内容。
ezycopyPhase 1: Determine Extraction Mode
阶段1:确定提取模式
Default mode uses fast HTTP fetch. Add when the page relies on client-side
JavaScript to render its content or when authentication cookies are required — the default
fetcher only sees the raw HTML response, not the JS-rendered DOM.
--browserCommon cases: Twitter/X, single-page applications, paywalled content.
--browser默认模式使用快速HTTP抓取。当页面依赖客户端JavaScript渲染内容,或需要身份验证Cookie时,请添加参数——默认抓取工具只能看到原始HTML响应,无法获取JS渲染后的DOM。
--browser常见需使用的场景:Twitter/X、单页应用、付费墙内容。
--browserFlags
参数
- — copy output to clipboard
-c - — save to file or directory
-o <path> - — use headless Chrome for JS-rendered or authenticated pages
--browser - — strip image links
--no-images - — timeout (default: 30s)
-t <duration>
- —— 将输出内容复制到剪贴板
-c - —— 保存到文件或目录
-o <路径> - —— 使用无头Chrome处理JS渲染或需身份验证的页面
--browser - —— 移除图片链接
--no-images - —— 超时时间(默认:30秒)
-t <时长>
Phase 2: Execute
阶段2:执行
Run with the chosen mode.
ezycopy <URL> [flags]In mode: run as a foreground process and do not redirect stderr with .
Chrome outputs diagnostic messages to stderr that should flow naturally rather than
polluting stdout capture.
--browser2>&1运行并选择相应模式。
ezycopy <URL> [参数]在模式下:以前台进程运行,不要使用重定向标准错误输出。Chrome会将诊断信息输出到标准错误流,应让其自然输出,避免污染标准输出的捕获内容。
--browser2>&1Phase 3: Handle Failure
阶段3:处理失败
If the output is empty or suspiciously short and was not used, retry with
— the site likely requires JS rendering.
--browser--browserIf is not found, ask the user before installing:
ezycopycurl -sSL https://raw.githubusercontent.com/gupsammy/EzyCopy/main/install.sh | sh如果输出为空或异常简短,且未使用参数,请重试并添加该参数——该网站可能需要JS渲染。
--browser如果未找到,请先询问用户再进行安装:
ezycopycurl -sSL https://raw.githubusercontent.com/gupsammy/EzyCopy/main/install.sh | shPhase 4: Deliver
阶段4:交付
Present the extracted markdown to the user. If the user requested a file save, use .
If they requested clipboard, use . When no explicit destination was given, display the
content directly.
-o-c将提取的markdown内容呈现给用户。如果用户要求保存为文件,使用参数;如果要求复制到剪贴板,使用参数;若未指定明确目标,则直接显示内容。
-o-c