Skip to content

caidewu/web-clip-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-clip-cli

一键将网页保存为 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" }
  ]
}

About

一键将网页保存为 Obsidian 兼容的 Markdown 文件,支持 obsidian-clipper 模板。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors