一键将网页保存为 Obsidian 兼容的 Markdown 文件。
npm install -g web-clip-cli
cd web-clip-cli
npm install
npm run build
npm link# 最简单用法 — 输出到当前目录
clip https://example.com/article
# 指定输出路径
clip https://example.com/article -o ~/Obsidian/InBox/文章.md
# 使用自定义模板
clip https://example.com/article -t my-template.json可选创建 ~/.cliprc:
{
"outputDir": "~/Obsidian/MyVault/Inbox",
"templatePath": "~/.clip-template.json"
}模板格式与 obsidian-clipper 兼容:
{
"id": "my-template",
"name": "我的模板",
"behavior": "create",
"noteNameFormat": "{{title}}",
"path": "",
"noteContentFormat": "{{content}}",
"properties": [
{ "name": "source", "value": "{{url}}", "type": "text" },
{ "name": "author", "value": "{{author}}", "type": "text" },
{ "name": "published", "value": "{{published}}", "type": "date" },
{ "name": "created", "value": "{{date}}", "type": "datetime" },
{ "name": "tags", "value": "", "type": "multitext" }
]
}