obsidian-bases
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseObsidian Bases Skill
Obsidian Bases 技能
This skill enables skills-compatible agents to create and edit valid Obsidian Bases ( files) including views, filters, formulas, and all related configurations.
.base本技能支持兼容技能的Agent创建和编辑有效的Obsidian Bases(文件),包括视图、筛选器、公式及所有相关配置。
.baseOverview
概述
Obsidian Bases are YAML-based files that define dynamic views of notes in an Obsidian vault. A Base file can contain multiple views, global filters, formulas, property configurations, and custom summaries.
Obsidian Bases是基于YAML的文件,用于定义Obsidian库中笔记的动态视图。一个Base文件可以包含多个视图、全局筛选器、公式、属性配置和自定义汇总。
File Format
文件格式
Base files use the extension and contain valid YAML. They can also be embedded in Markdown code blocks.
.baseBase文件使用扩展名,内容为合法的YAML格式。它们也可以嵌入到Markdown代码块中。
.baseComplete Schema
完整Schema
yaml
undefinedyaml
undefinedGlobal filters apply to ALL views in the base
全局筛选器适用于Base中的所有视图
filters:
Can be a single filter string
OR a recursive filter object with and/or/not
and: []
or: []
not: []
filters:
可以是单个筛选字符串
或者是包含and/or/not的递归筛选对象
and: []
or: []
not: []
Define formula properties that can be used across all views
定义可在所有视图中使用的公式属性
formulas:
formula_name: 'expression'
formulas:
formula_name: 'expression'
Configure display names and settings for properties
配置属性的显示名称和设置
properties:
property_name:
displayName: "Display Name"
formula.formula_name:
displayName: "Formula Display Name"
file.ext:
displayName: "Extension"
properties:
property_name:
displayName: "Display Name"
formula.formula_name:
displayName: "Formula Display Name"
file.ext:
displayName: "Extension"
Define custom summary formulas
定义自定义汇总公式
summaries:
custom_summary_name: 'values.mean().round(3)'
summaries:
custom_summary_name: 'values.mean().round(3)'
Define one or more views
定义一个或多个视图
views:
- type: table | cards | list | map
name: "View Name"
limit: 10 # Optional: limit results
groupBy: # Optional: group results
property: property_name
direction: ASC | DESC
filters: # View-specific filters
and: []
order: # Properties to display in order
- file.name
- property_name
- formula.formula_name summaries: # Map properties to summary formulas property_name: Average
undefinedviews:
- type: table | cards | list | map
name: "View Name"
limit: 10 # 可选:限制结果数量
groupBy: # 可选:对结果分组
property: property_name
direction: ASC | DESC
filters: # 视图专属筛选器
and: []
order: # 要显示的属性顺序
- file.name
- property_name
- formula.formula_name summaries: # 将属性映射到汇总公式 property_name: Average
undefinedFilter Syntax
筛选器语法
Filters narrow down results. They can be applied globally or per-view.
筛选器用于缩小结果范围,可全局应用或按视图应用。
Filter Structure
筛选器结构
yaml
undefinedyaml
undefinedSingle filter
单个筛选器
filters: 'status == "done"'
filters: 'status == "done"'
AND - all conditions must be true
AND - 所有条件必须为真
filters:
and:
- 'status == "done"'
- 'priority > 3'
filters:
and:
- 'status == "done"'
- 'priority > 3'
OR - any condition can be true
OR - 任一条件为真即可
filters:
or:
- 'file.hasTag("book")'
- 'file.hasTag("article")'
filters:
or:
- 'file.hasTag("book")'
- 'file.hasTag("article")'
NOT - exclude matching items
NOT - 排除匹配项
filters:
not:
- 'file.hasTag("archived")'
filters:
not:
- 'file.hasTag("archived")'
Nested filters
嵌套筛选器
filters:
or:
- file.hasTag("tag")
- and:
- file.hasTag("book")
- file.hasLink("Textbook")
- not:
- file.hasTag("book")
- file.inFolder("Required Reading")
undefinedfilters:
or:
- file.hasTag("tag")
- and:
- file.hasTag("book")
- file.hasLink("Textbook")
- not:
- file.hasTag("book")
- file.inFolder("Required Reading")
undefinedFilter Operators
筛选器运算符
| Operator | Description |
|---|---|
| equals |
| not equal |
| greater than |
| less than |
| greater than or equal |
| less than or equal |
| logical and |
| logical or |
| <code>!</code> | logical not |
| 运算符 | 描述 |
|---|---|
| 等于 |
| 不等于 |
| 大于 |
| 小于 |
| 大于等于 |
| 小于等于 |
| 逻辑与 |
| 逻辑或 |
| <code>!</code> | 逻辑非 |
Properties
属性
Three Types of Properties
三种属性类型
- Note properties - From frontmatter: or just
note.authorauthor - File properties - File metadata: ,
file.name, etc.file.mtime - Formula properties - Computed values:
formula.my_formula
- 笔记属性 - 来自前置元数据:或直接写
note.authorauthor - 文件属性 - 文件元数据:,
file.name等file.mtime - 公式属性 - 计算值:
formula.my_formula
File Properties Reference
文件属性参考
| Property | Type | Description |
|---|---|---|
| String | File name |
| String | File name without extension |
| String | Full path to file |
| String | Parent folder path |
| String | File extension |
| Number | File size in bytes |
| Date | Created time |
| Date | Modified time |
| List | All tags in file |
| List | Internal links in file |
| List | Files linking to this file |
| List | Embeds in the note |
| Object | All frontmatter properties |
| 属性 | 类型 | 描述 |
|---|---|---|
| 字符串 | 文件名 |
| 字符串 | 不含扩展名的文件名 |
| 字符串 | 文件完整路径 |
| 字符串 | 父文件夹路径 |
| 字符串 | 文件扩展名 |
| 数字 | 文件大小(字节) |
| 日期 | 创建时间 |
| 日期 | 修改时间 |
| 列表 | 文件中的所有标签 |
| 列表 | 文件中的内部链接 |
| 列表 | 链接到本文件的文件 |
| 列表 | 笔记中的嵌入内容 |
| 对象 | 所有前置元数据属性 |
The this
Keyword
thisthis
关键字
this- In main content area: refers to the base file itself
- When embedded: refers to the embedding file
- In sidebar: refers to the active file in main content
- 在主内容区域:指代Base文件本身
- 嵌入时:指代嵌入该Base的文件
- 在侧边栏:指代主内容区域的活动文件
Formula Syntax
公式语法
Formulas compute values from properties. Defined in the section.
formulasyaml
formulas:
# Simple arithmetic
total: "price * quantity"
# Conditional logic
status_icon: 'if(done, "✅", "⏳")'
# String formatting
formatted_price: 'if(price, price.toFixed(2) + " dollars")'
# Date formatting
created: 'file.ctime.format("YYYY-MM-DD")'
# Calculate days since created (use .days for Duration)
days_old: '(now() - file.ctime).days'
# Calculate days until due date
days_until_due: 'if(due_date, (date(due_date) - today()).days, "")'公式用于根据属性计算值,定义在区域。
formulasyaml
formulas:
# 简单算术运算
total: "price * quantity"
# 条件逻辑
status_icon: 'if(done, "✅", "⏳")'
# 字符串格式化
formatted_price: 'if(price, price.toFixed(2) + " dollars")'
# 日期格式化
created: 'file.ctime.format("YYYY-MM-DD")'
# 计算创建后经过的天数(使用.days获取时长)
days_old: '(now() - file.ctime).days'
# 计算距离截止日期的天数
days_until_due: 'if(due_date, (date(due_date) - today()).days, "")'Functions Reference
函数参考
Global Functions
全局函数
| Function | Signature | Description |
|---|---|---|
| | Parse string to date. Format: |
| | Parse duration string |
| | Current date and time |
| | Current date (time = 00:00:00) |
| | Conditional |
| | Smallest number |
| | Largest number |
| | Convert to number |
| | Create a link |
| | Wrap in list if not already |
| | Get file object |
| | Create image for rendering |
| | Lucide icon by name |
| | Render as HTML |
| | Escape HTML characters |
| 函数 | 签名 | 描述 |
|---|---|---|
| | 将字符串解析为日期,格式: |
| | 解析时长字符串 |
| | 当前日期和时间 |
| | 当前日期(时间为00:00:00) |
| | 条件判断 |
| | 最小值 |
| | 最大值 |
| | 转换为数字 |
| | 创建链接 |
| | 若不是列表则包装为列表 |
| | 获取文件对象 |
| | 创建用于渲染的图片 |
| | 通过名称获取Lucide图标 |
| | 渲染为HTML |
| | 转义HTML字符 |
Any Type Functions
任意类型函数
| Function | Signature | Description |
|---|---|---|
| | Coerce to boolean |
| | Check type |
| | Convert to string |
| 函数 | 签名 | 描述 |
|---|---|---|
| | 转换为布尔值 |
| | 检查类型 |
| | 转换为字符串 |
Date Functions & Fields
日期函数与字段
Fields: , , , , , ,
date.yeardate.monthdate.daydate.hourdate.minutedate.seconddate.millisecond| Function | Signature | Description |
|---|---|---|
| | Remove time portion |
| | Format with Moment.js pattern |
| | Get time as string |
| | Human-readable relative time |
| | Always false for dates |
字段: , , , , , ,
date.yeardate.monthdate.daydate.hourdate.minutedate.seconddate.millisecond| 函数 | 签名 | 描述 |
|---|---|---|
| | 移除时间部分 |
| | 使用Moment.js格式进行格式化 |
| | 获取时间字符串 |
| | 人类可读的相对时间 |
| | 日期永远不为空 |
Duration Type
时长类型
When subtracting two dates, the result is a Duration type (not a number). Duration has its own properties and methods.
Duration Fields:
| Field | Type | Description |
|---|---|---|
| Number | Total days in duration |
| Number | Total hours in duration |
| Number | Total minutes in duration |
| Number | Total seconds in duration |
| Number | Total milliseconds in duration |
IMPORTANT: Duration does NOT support , , directly. You must access a numeric field first (like ), then apply number functions.
.round().floor().ceil().daysyaml
undefined两个日期相减的结果是时长类型(而非数字),时长有自己的属性和方法。
时长字段:
| 字段 | 类型 | 描述 |
|---|---|---|
| 数字 | 时长中的总天数 |
| 数字 | 时长中的总小时数 |
| 数字 | 时长中的总分钟数 |
| 数字 | 时长中的总秒数 |
| 数字 | 时长中的总毫秒数 |
重要提示: 时长不直接支持、、方法。必须先获取数值字段(如),再应用数字函数。
.round().floor().ceil().daysyaml
undefinedCORRECT: Calculate days between dates
正确:计算两个日期之间的天数
"(date(due_date) - today()).days" # Returns number of days
"(now() - file.ctime).days" # Days since created
"(date(due_date) - today()).days" # 返回天数
"(now() - file.ctime).days" # 创建后经过的天数
CORRECT: Round the numeric result if needed
正确:如需对结果取整
"(date(due_date) - today()).days.round(0)" # Rounded days
"(now() - file.ctime).hours.round(0)" # Rounded hours
"(date(due_date) - today()).days.round(0)" # 取整天数
"(now() - file.ctime).hours.round(0)" # 取整小时数
WRONG - will cause error:
错误 - 会导致报错:
"((date(due) - today()) / 86400000).round(0)" # Duration doesn't support division then round
"((date(due) - today()) / 86400000).round(0)" # 时长不支持除法后取整
undefinedundefinedDate Arithmetic
日期运算
yaml
undefinedyaml
undefinedDuration units: y/year/years, M/month/months, d/day/days,
时长单位:y/year/years, M/month/months, d/day/days,
w/week/weeks, h/hour/hours, m/minute/minutes, s/second/seconds
w/week/weeks, h/hour/hours, m/minute/minutes, s/second/seconds
Add/subtract durations
增加/减少时长
"date + "1M"" # Add 1 month
"date - "2h"" # Subtract 2 hours
"now() + "1 day"" # Tomorrow
"today() + "7d"" # A week from today
"date + "1M"" # 增加1个月
"date - "2h"" # 减少2小时
"now() + "1 day"" # 明天
"today() + "7d"" # 一周后
Subtract dates returns Duration type
日期相减返回时长类型
"now() - file.ctime" # Returns Duration
"(now() - file.ctime).days" # Get days as number
"(now() - file.ctime).hours" # Get hours as number
"now() - file.ctime" # 返回时长
"(now() - file.ctime).days" # 获取天数(数字)
"(now() - file.ctime).hours" # 获取小时数(数字)
Complex duration arithmetic
复杂时长运算
"now() + (duration('1d') * 2)"
undefined"now() + (duration('1d') * 2)"
undefinedString Functions
字符串函数
Field:
string.length| Function | Signature | Description |
|---|---|---|
| | Check substring |
| | All substrings present |
| | Any substring present |
| | Starts with query |
| | Ends with query |
| | Empty or not present |
| | To lowercase |
| | To Title Case |
| | Remove whitespace |
| | Replace pattern |
| | Repeat string |
| | Reverse string |
| | Substring |
| | Split to list |
字段:
string.length| 函数 | 签名 | 描述 |
|---|---|---|
| | 检查是否包含子字符串 |
| | 是否包含所有指定子字符串 |
| | 是否包含任一指定子字符串 |
| | 是否以指定字符串开头 |
| | 是否以指定字符串结尾 |
| | 是否为空或不存在 |
| | 转换为小写 |
| | 转换为首字母大写格式 |
| | 去除首尾空白字符 |
| | 替换指定模式 |
| | 重复字符串指定次数 |
| | 反转字符串 |
| | 截取子字符串 |
| | 按分隔符分割为列表 |
Number Functions
数字函数
| Function | Signature | Description |
|---|---|---|
| | Absolute value |
| | Round up |
| | Round down |
| | Round to digits |
| | Fixed-point notation |
| | Not present |
| 函数 | 签名 | 描述 |
|---|---|---|
| | 绝对值 |
| | 向上取整 |
| | 向下取整 |
| | 四舍五入到指定位数 |
| | 固定小数位数格式 |
| | 是否不存在 |
List Functions
列表函数
Field:
list.length| Function | Signature | Description |
|---|---|---|
| | Element exists |
| | All elements exist |
| | Any element exists |
| | Filter by condition (uses |
| | Transform elements (uses |
| | Reduce to single value (uses |
| | Flatten nested lists |
| | Join to string |
| | Reverse order |
| | Sublist |
| | Sort ascending |
| | Remove duplicates |
| | No elements |
字段:
list.length| 函数 | 签名 | 描述 |
|---|---|---|
| | 元素是否存在 |
| | 是否包含所有指定元素 |
| | 是否包含任一指定元素 |
| | 按条件筛选元素(使用 |
| | 转换元素(使用 |
| | 归约为单个值(使用 |
| | 扁平化嵌套列表 |
| | 连接为字符串 |
| | 反转列表顺序 |
| | 截取子列表 |
| | 升序排序 |
| | 移除重复元素 |
| | 是否无元素 |
File Functions
文件函数
| Function | Signature | Description |
|---|---|---|
| | Convert to link |
| | Has link to file |
| | Has any of the tags |
| | Has property |
| | In folder or subfolder |
| 函数 | 签名 | 描述 |
|---|---|---|
| | 转换为链接 |
| | 是否包含指向指定文件的链接 |
| | 是否包含任一指定标签 |
| | 是否包含指定属性 |
| | 是否在指定文件夹或其子文件夹中 |
Link Functions
链接函数
| Function | Signature | Description |
|---|---|---|
| | Get file object |
| | Links to file |
| 函数 | 签名 | 描述 |
|---|---|---|
| | 获取链接对应的文件对象 |
| | 是否链接到指定文件 |
Object Functions
对象函数
| Function | Signature | Description |
|---|---|---|
| | No properties |
| | List of keys |
| | List of values |
| 函数 | 签名 | 描述 |
|---|---|---|
| | 是否无属性 |
| | 获取属性键列表 |
| | 获取属性值列表 |
Regular Expression Functions
正则表达式函数
| Function | Signature | Description |
|---|---|---|
| | Test if matches |
| 函数 | 签名 | 描述 |
|---|---|---|
| | 测试字符串是否匹配正则 |
View Types
视图类型
Table View
表格视图
yaml
views:
- type: table
name: "My Table"
order:
- file.name
- status
- due_date
summaries:
price: Sum
count: Averageyaml
views:
- type: table
name: "我的表格"
order:
- file.name
- status
- due_date
summaries:
price: Sum
count: AverageCards View
卡片视图
yaml
views:
- type: cards
name: "Gallery"
order:
- file.name
- cover_image
- descriptionyaml
views:
- type: cards
name: "画廊"
order:
- file.name
- cover_image
- descriptionList View
列表视图
yaml
views:
- type: list
name: "Simple List"
order:
- file.name
- statusyaml
views:
- type: list
name: "简单列表"
order:
- file.name
- statusMap View
地图视图
Requires latitude/longitude properties and the Maps community plugin.
yaml
views:
- type: map
name: "Locations"
# Map-specific settings for lat/lng properties需要经纬度属性和Maps社区插件支持。
yaml
views:
- type: map
name: "位置"
# 地图专属的经纬度属性设置Default Summary Formulas
默认汇总公式
| Name | Input Type | Description |
|---|---|---|
| Number | Mathematical mean |
| Number | Smallest number |
| Number | Largest number |
| Number | Sum of all numbers |
| Number | Max - Min |
| Number | Mathematical median |
| Number | Standard deviation |
| Date | Earliest date |
| Date | Latest date |
| Date | Latest - Earliest |
| Boolean | Count of true values |
| Boolean | Count of false values |
| Any | Count of empty values |
| Any | Count of non-empty values |
| Any | Count of unique values |
| 名称 | 输入类型 | 描述 |
|---|---|---|
| 数字 | 算术平均值 |
| 数字 | 最小值 |
| 数字 | 最大值 |
| 数字 | 所有数字的总和 |
| 数字 | 最大值 - 最小值 |
| 数字 | 算术中位数 |
| 数字 | 标准差 |
| 日期 | 最早日期 |
| 日期 | 最晚日期 |
| 日期 | 最晚日期 - 最早日期 |
| 布尔值 | 真值的数量 |
| 布尔值 | 假值的数量 |
| 任意类型 | 空值的数量 |
| 任意类型 | 非空值的数量 |
| 任意类型 | 唯一值的数量 |
Complete Examples
完整示例
Task Tracker Base
任务追踪Base
yaml
filters:
and:
- file.hasTag("task")
- 'file.ext == "md"'
formulas:
days_until_due: 'if(due, (date(due) - today()).days, "")'
is_overdue: 'if(due, date(due) < today() && status != "done", false)'
priority_label: 'if(priority == 1, "🔴 High", if(priority == 2, "🟡 Medium", "🟢 Low"))'
properties:
status:
displayName: Status
formula.days_until_due:
displayName: "Days Until Due"
formula.priority_label:
displayName: Priority
views:
- type: table
name: "Active Tasks"
filters:
and:
- 'status != "done"'
order:
- file.name
- status
- formula.priority_label
- due
- formula.days_until_due
groupBy:
property: status
direction: ASC
summaries:
formula.days_until_due: Average
- type: table
name: "Completed"
filters:
and:
- 'status == "done"'
order:
- file.name
- completed_dateyaml
filters:
and:
- file.hasTag("task")
- 'file.ext == "md"'
formulas:
days_until_due: 'if(due, (date(due) - today()).days, "")'
is_overdue: 'if(due, date(due) < today() && status != "done", false)'
priority_label: 'if(priority == 1, "🔴 高", if(priority == 2, "🟡 中", "🟢 低"))'
properties:
status:
displayName: 状态
formula.days_until_due:
displayName: "距离截止日天数"
formula.priority_label:
displayName: 优先级
views:
- type: table
name: "活跃任务"
filters:
and:
- 'status != "done"'
order:
- file.name
- status
- formula.priority_label
- due
- formula.days_until_due
groupBy:
property: status
direction: ASC
summaries:
formula.days_until_due: Average
- type: table
name: "已完成"
filters:
and:
- 'status == "done"'
order:
- file.name
- completed_dateReading List Base
阅读清单Base
yaml
filters:
or:
- file.hasTag("book")
- file.hasTag("article")
formulas:
reading_time: 'if(pages, (pages * 2).toString() + " min", "")'
status_icon: 'if(status == "reading", "📖", if(status == "done", "✅", "📚"))'
year_read: 'if(finished_date, date(finished_date).year, "")'
properties:
author:
displayName: Author
formula.status_icon:
displayName: ""
formula.reading_time:
displayName: "Est. Time"
views:
- type: cards
name: "Library"
order:
- cover
- file.name
- author
- formula.status_icon
filters:
not:
- 'status == "dropped"'
- type: table
name: "Reading List"
filters:
and:
- 'status == "to-read"'
order:
- file.name
- author
- pages
- formula.reading_timeyaml
filters:
or:
- file.hasTag("book")
- file.hasTag("article")
formulas:
reading_time: 'if(pages, (pages * 2).toString() + " 分钟", "")'
status_icon: 'if(status == "reading", "📖", if(status == "done", "✅", "📚"))'
year_read: 'if(finished_date, date(finished_date).year, "")'
properties:
author:
displayName: 作者
formula.status_icon:
displayName: ""
formula.reading_time:
displayName: "预计时长"
views:
- type: cards
name: "图书馆"
order:
- cover
- file.name
- author
- formula.status_icon
filters:
not:
- 'status == "dropped"'
- type: table
name: "阅读清单"
filters:
and:
- 'status == "to-read"'
order:
- file.name
- author
- pages
- formula.reading_timeProject Notes Base
项目笔记Base
yaml
filters:
and:
- file.inFolder("Projects")
- 'file.ext == "md"'
formulas:
last_updated: 'file.mtime.relative()'
link_count: 'file.links.length'
summaries:
avgLinks: 'values.filter(value.isType("number")).mean().round(1)'
properties:
formula.last_updated:
displayName: "Updated"
formula.link_count:
displayName: "Links"
views:
- type: table
name: "All Projects"
order:
- file.name
- status
- formula.last_updated
- formula.link_count
summaries:
formula.link_count: avgLinks
groupBy:
property: status
direction: ASC
- type: list
name: "Quick List"
order:
- file.name
- statusyaml
filters:
and:
- file.inFolder("Projects")
- 'file.ext == "md"'
formulas:
last_updated: 'file.mtime.relative()'
link_count: 'file.links.length'
summaries:
avgLinks: 'values.filter(value.isType("number")).mean().round(1)'
properties:
formula.last_updated:
displayName: "更新时间"
formula.link_count:
displayName: "链接数"
views:
- type: table
name: "所有项目"
order:
- file.name
- status
- formula.last_updated
- formula.link_count
summaries:
formula.link_count: avgLinks
groupBy:
property: status
direction: ASC
- type: list
name: "快速列表"
order:
- file.name
- statusDaily Notes Index
每日笔记索引Base
yaml
filters:
and:
- file.inFolder("Daily Notes")
- '/^\d{4}-\d{2}-\d{2}$/.matches(file.basename)'
formulas:
word_estimate: '(file.size / 5).round(0)'
day_of_week: 'date(file.basename).format("dddd")'
properties:
formula.day_of_week:
displayName: "Day"
formula.word_estimate:
displayName: "~Words"
views:
- type: table
name: "Recent Notes"
limit: 30
order:
- file.name
- formula.day_of_week
- formula.word_estimate
- file.mtimeyaml
filters:
and:
- file.inFolder("Daily Notes")
- '/^\d{4}-\d{2}-\d{2}$/.matches(file.basename)'
formulas:
word_estimate: '(file.size / 5).round(0)'
day_of_week: 'date(file.basename).format("dddd")'
properties:
formula.day_of_week:
displayName: "星期"
formula.word_estimate:
displayName: "~字数"
views:
- type: table
name: "近期笔记"
limit: 30
order:
- file.name
- formula.day_of_week
- formula.word_estimate
- file.mtimeEmbedding Bases
嵌入Bases
Embed in Markdown files:
markdown
![[MyBase.base]]
<!-- Specific view -->
![[MyBase.base#View Name]]在Markdown文件中嵌入:
markdown
![[MyBase.base]]
<!-- 指定视图 -->
![[MyBase.base#视图名称]]YAML Quoting Rules
YAML 引号规则
- Use single quotes for formulas containing double quotes:
'if(done, "Yes", "No")' - Use double quotes for simple strings:
"My View Name" - Escape nested quotes properly in complex expressions
- 公式中包含双引号时使用单引号包裹:
'if(done, "Yes", "No")' - 简单字符串使用双引号:
"我的视图名称" - 复杂表达式中正确转义嵌套引号
Common Patterns
常见模式
Filter by Tag
按标签筛选
yaml
filters:
and:
- file.hasTag("project")yaml
filters:
and:
- file.hasTag("project")Filter by Folder
按文件夹筛选
yaml
filters:
and:
- file.inFolder("Notes")yaml
filters:
and:
- file.inFolder("Notes")Filter by Date Range
按日期范围筛选
yaml
filters:
and:
- 'file.mtime > now() - "7d"'yaml
filters:
and:
- 'file.mtime > now() - "7d"'Filter by Property Value
按属性值筛选
yaml
filters:
and:
- 'status == "active"'
- 'priority >= 3'yaml
filters:
and:
- 'status == "active"'
- 'priority >= 3'Combine Multiple Conditions
组合多个条件
yaml
filters:
or:
- and:
- file.hasTag("important")
- 'status != "done"'
- and:
- 'priority == 1'
- 'due != ""'yaml
filters:
or:
- and:
- file.hasTag("important")
- 'status != "done"'
- and:
- 'priority == 1'
- 'due != ""'