Obsidan(三) 插件用法

一、dataview使用方法

搜索用法

* 直接搜索关键字
* 搜索包含多个关键字的文档(空格间隔)
* 搜索包含某一个关键字的文档(OR)
* 指定搜索范围
    * 搜索文件名 file:word
    * 搜索文本内容 contant:word
    * 搜索标签 tag:word 
    * 搜索同一行中的关键词 line:word1 word2
    * 搜索同一章节中的多个关键字 section:word1 word2
    * 搜索同一段落(块)中的多个关键词 block:word1 word2 

数据库用法

定义

  • Obsidian资料库中的查询工具/插件
    • 查询对象:Obsidian数据库
    • 查询依据:
      • [04 YAML|YAML]
      • [[03 meatainfo|meatainfo}]](文件属性,不可自定义)

完整语法

![[Pasted image 20220909154144.png]]

用法示例

示例1: 检索文件夹中内容:

list from "00 Obsidan学习笔记"

示例2: 增加条件检索文件夹中内容

list 
from # dataview查询依据
where rating > 5

示例3: 检索文件夹中内容,升/降序排列(按文件名称):

list 
from # dataview查询依据
where rating > 5
sort file.name asc

示例4: 检索文件夹中内容,升/降序排列,以表格形式展现:

table file.size as 文件大小 , rating as 评分
from #dataview查询依据
where rating > 5
sort file.name asc

二、Admination插件用法

功能

放置折叠框

语法


```ad-<type> # Admonition type. See below for a list of available types.
title:                  # Admonition title.
collapse:               # Create a collapsible admonition.
icon:                   # Override the icon.
color:                  # Override the color.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla.</code></pre>
<h2>属性</h2>
<ul>
<li><strong>Admonition类型</strong>
![[Pasted image 20220909184056.png]]
<pre><code class="language-ad-example">title: 示例
type=example</code></pre></li>
</ul>
<pre><code class="language-ad-quote">title: 语录
type=quote</code></pre>
<pre><code class="language-ad-abstract">title: 摘要
type=abstract</code></pre>
<pre><code class="language-ad-bug">title: BUG
type=bug</code></pre>
<pre><code class="language-ad-info">title: 信息
type=info</code></pre>
<pre><code class="language-ad-warning">title: 警告
type=warning</code></pre>
<pre><code class="language-ad-failure">title: 失败
type=failure</code></pre>
<pre><code class="language-ad-important">title: 重要
type=important</code></pre>
<pre><code class="language-ad-question">title: 问题
type=question</code></pre>
<pre><code class="language-ad-danger">title: 危险
type=danger</code></pre>
<ul>
<li>
<p><strong>title</strong>:       # Admonition title. 键入标题</p>
<pre><code class="language-ad-note">title: 输入标题(若标题字段留空仅显示文本内容)
[输入文本内容]</code></pre>
</li>
<li>
<p><strong>collapse</strong>:    # Create a collapsible admonition. 使用 collapse参数创建可折叠的admonition。</p>
<ul>
<li><code>collapse: open</code>  默认打开,可折叠</li>
<li><code>collapse: on</code>  默认折叠,可打开</li>
<li>如果参数为空白,则 collapse 参数将不执行任何操作。</li>
<li>默认情况下,在设置中,admonition可以设置为可折叠。
<pre><code class="language-ad-note">title: 示例:默认打开,可折叠
collapse: open
[输入文本内容]</code></pre>
<pre><code class="language-ad-note">title: 示例:默认折叠,可打开
collapse: on
[输入文本内容]</code></pre></li>
</ul>
</li>
<li><strong>icon</strong>:        # Override the icon. 改变图标
<pre><code class="language-ad-note">
icon: triforce
[输入文本内容]</code></pre></li>
</ul>
<pre><code>
* **color**:       # Override the color. 改变颜色
可以使用该参数设置Admonition颜色。**输入的颜色必须是 RGB 三元组。**
```ad-note
color: 1000, 100, 100

[输入文本内容]
  • 嵌套使用
title: Nested Admonitions
collapse: open

Hello!

````ad-note
title: This admonition is nested.
This is a nested admonition!

```ad-warning
title: This admonition is closed.
collapse: close</code></pre>
<pre><code>
This is in the original admonition.</code></pre>
<ul>
<li><strong>在Admonitions中显示代码块</strong></li>
</ul>
<p>对于单个层,可以使用标记代码块语法:<code>~~~</code></p>
<pre><code class="language-ad-info">
```ad-bug
title: I'm Nested!
~~~javascript
throw new Error("Oops, I&#039;m a bug.");
~~~
console.log("Hello!");
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇