[ PROMPT_NODE_26044 ]
json-schema
[ SKILL_DOCUMENTATION ]
# Obsidian Web Clipper JSON 架构
Obsidian Web Clipper 通过 JSON 文件导入模板。
## 根结构
{
"schemaVersion": "0.1.0",
"name": "模板名称",
"behavior": "create",
"noteContentFormat": "Markdown 内容...",
"properties": [],
"triggers": [],
"noteNameFormat": "{{title}}",
"path": "Inbox/"
}
### 字段说明
* **`schemaVersion`**: 始终为 "0.1.0"。
* **`name`**: 在 Clipper 中显示的模板名称。
* **`behavior`**: 笔记创建方式。
* `create`: 创建新笔记。
* `append-specific`: 追加到特定笔记(需要 `path` 为完整文件路径)。
* `append-daily`: 追加到每日笔记。
* **`noteContentFormat`**: 笔记正文内容。
* 使用 `n` 表示换行。
* 可以使用所有变量(例如 `{{content}}`, `{{selection}}`)。
* **`noteNameFormat`**: 文件名格式(例如 `{{date}} - {{title}}`)。
* **`path`**: 保存笔记的位置。
* 对于 `create` 行为:保存笔记的*文件夹*(例如 `Clippings/` 或 `Recipes/`)。
* 对于 `append-specific` 行为:要追加内容的笔记的*完整文件路径*(例如 `Databases/Recipes.md`)。
* **`triggers`**: 用于自动选择此模板的字符串数组。
* **URL 模式**: `["https://www.youtube.com/watch"]`(简单字符串或正则表达式)。
* **Schema 类型**: `["schema:Recipe"]`(如果页面包含此 Schema.org 类型则触发)。
## 属性 (Properties)
`properties` 数组定义了笔记的 YAML frontmatter。
"properties": [
{
"name": "category",
"value": "Recipes",
"type": "text"
},
{
"name": "published",
"value": "{{published}}",
"type": "datetime"
}
]
### 属性类型
* **`text`**: 简单文本字符串。
* **`multitext`**: 文本字符串列表(用于标签/别名)。
* **`number`**: 数值。
* **`checkbox`**: 布尔值 true/false。
* **`date`**: 日期字符串 (YYYY-MM-DD)。
* **`datetime`**: 日期和时间字符串。
### 属性对象结构
* **`name`**: YAML frontmatter 中的键。
* **`value`**: 要填充的值,可以包含变量。
* **`type`**: 上述列出的类型之一。