From 05e8c85cc2a1b52d375d181cd3859bf1665691c9 Mon Sep 17 00:00:00 2001 From: ouczbs Date: Fri, 25 Aug 2023 22:34:04 +0800 Subject: [PATCH] obsidian plugins --- .obsidian/community-plugins.json | 4 +- .obsidian/daily-notes.json | 2 +- .obsidian/graph.json | 12 +-- diary/2023/2023-08-25.md | 19 ++++ diary/diary.md | 13 --- diary/kanban/anki.md | 37 ++++++++ note/code/lang/C++/编程习惯/VS编辑器.md | 10 --- note/code/设计模式.md | 4 +- note/learn/learn.md | 2 +- note/learn/lib/yacc.md | 2 +- note/learn/lib/环境搭建/环境搭建.md | 27 +++--- readme.md | 2 +- note/learn/tool/Anki.md => src/anki/anki.md | 0 {note/learn/tool => src/obsidian}/obsidian.md | 25 ++++-- src/obsidian/templater.md | 88 +++++++++++++++++++ {note/learn/lib => src}/xmake/xmake API.md | 0 {note/learn/lib => src}/xmake/xmake 使用.md | 0 {note/learn/lib => src}/xmake/xmake 库.md | 0 {note/learn/lib => src}/xmake/xmake 源码.md | 0 {note/learn/lib => src}/xmake/xmake 解析.md | 0 {note/learn/lib => src}/xmake/xmake.md | 0 template/_base.md | 8 ++ template/_kanban.md | 30 +++++++ template/diary/_diary.md | 28 ++++++ template/diary/_month.md | 0 template/diary/_quarterly.md | 0 template/diary/_week.md | 27 ++++++ template/diary/_year.md | 0 28 files changed, 286 insertions(+), 54 deletions(-) create mode 100644 diary/2023/2023-08-25.md delete mode 100644 diary/diary.md create mode 100644 diary/kanban/anki.md delete mode 100644 note/code/lang/C++/编程习惯/VS编辑器.md rename note/learn/tool/Anki.md => src/anki/anki.md (100%) rename {note/learn/tool => src/obsidian}/obsidian.md (55%) create mode 100644 src/obsidian/templater.md rename {note/learn/lib => src}/xmake/xmake API.md (100%) rename {note/learn/lib => src}/xmake/xmake 使用.md (100%) rename {note/learn/lib => src}/xmake/xmake 库.md (100%) rename {note/learn/lib => src}/xmake/xmake 源码.md (100%) rename {note/learn/lib => src}/xmake/xmake 解析.md (100%) rename {note/learn/lib => src}/xmake/xmake.md (100%) create mode 100644 template/_base.md create mode 100644 template/_kanban.md create mode 100644 template/diary/_diary.md create mode 100644 template/diary/_month.md create mode 100644 template/diary/_quarterly.md create mode 100644 template/diary/_week.md create mode 100644 template/diary/_year.md diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 858192b..8a3909c 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -3,5 +3,7 @@ "obsidian-kanban", "obsidian-excalidraw-plugin", "calendar", - "obsidian-image-auto-upload-plugin" + "obsidian-image-auto-upload-plugin", + "templater-obsidian", + "periodic-notes" ] \ No newline at end of file diff --git a/.obsidian/daily-notes.json b/.obsidian/daily-notes.json index 5e4e0c5..e873cb3 100644 --- a/.obsidian/daily-notes.json +++ b/.obsidian/daily-notes.json @@ -1,5 +1,5 @@ { - "template": "", + "template": "template/diary/_diary", "autorun": true, "folder": "diary/2023", "format": "YYYY-MM-DD" diff --git a/.obsidian/graph.json b/.obsidian/graph.json index 37690f8..0cdb05b 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -1,11 +1,11 @@ { - "collapse-filter": true, + "collapse-filter": false, "search": "", - "showTags": false, + "showTags": true, "showAttachments": false, - "hideUnresolved": false, - "showOrphans": true, - "collapse-color-groups": true, + "hideUnresolved": true, + "showOrphans": false, + "collapse-color-groups": false, "colorGroups": [], "collapse-display": true, "showArrow": false, @@ -17,6 +17,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 0.4505081176757823, + "scale": 0.22920135941749445, "close": false } \ No newline at end of file diff --git a/diary/2023/2023-08-25.md b/diary/2023/2023-08-25.md new file mode 100644 index 0000000..bde60c2 --- /dev/null +++ b/diary/2023/2023-08-25.md @@ -0,0 +1,19 @@ +--- +creation date: 2023-08-25 19:51 +modification date: 星期五 25日 八月 2023 19:55:58 +--- + + +#anki/word +### invocation +- lg +This means that a Templater function invocation will always start with `tp.` + +### parenthesis +- lg +To invoke a function, we need to use a syntax specific to functions calls: appending an opening and a closing parenthesis after the function name. + +### non-exhaustive +- lg +Here is a non-exhaustive list of the possible types of a function + diff --git a/diary/diary.md b/diary/diary.md deleted file mode 100644 index 762f38b..0000000 --- a/diary/diary.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -PromptInfo: - promptId: 头脑风暴 - name: 💡头脑风暴 - description: 对某个主题进行头脑风暴 - author: Oldwinter - tags: ideas, writing - version: 0.0.1 ---- -content: -{{context}} -prompt: -帮我对这个主题进行头脑风暴:content \ No newline at end of file diff --git a/diary/kanban/anki.md b/diary/kanban/anki.md new file mode 100644 index 0000000..8be4bbe --- /dev/null +++ b/diary/kanban/anki.md @@ -0,0 +1,37 @@ +--- + +tags: task/todo +creation date: 2023-08-25 22:27 +modification date: 星期五 25日 八月 2023 22:27:20 +kanban-plugin: basic + +--- + +## #task/todo + +- [ ] #task/p11#2023/08
规划 + + +## #task/doing + +- [ ] #task/p11#2023/08
进行中 + + +## #task/done + +**完成** +- [ ] #task/p11#2023/08
已完成 + + +## #task/delay + +- [ ] #task/p11#2023/08
延后 + + + + +%% kanban:settings +``` +{"kanban-plugin":"basic"} +``` +%% \ No newline at end of file diff --git a/note/code/lang/C++/编程习惯/VS编辑器.md b/note/code/lang/C++/编程习惯/VS编辑器.md deleted file mode 100644 index 9966e17..0000000 --- a/note/code/lang/C++/编程习惯/VS编辑器.md +++ /dev/null @@ -1,10 +0,0 @@ -# VS编辑器 -## VC++目录 -### 包含目录 -- 寻找 #include中的xxxx.h的搜索目录 -- -### 库目录 -- 寻找.lib文件的搜索目录 -- -### 引用目录 -### 可执行目录 \ No newline at end of file diff --git a/note/code/设计模式.md b/note/code/设计模式.md index e4a219d..5e62347 100644 --- a/note/code/设计模式.md +++ b/note/code/设计模式.md @@ -105,7 +105,7 @@ title: 设计模式 - 共享对象 -- 结构模式 #类 +- 结构模式 - 组合模式 @@ -132,7 +132,7 @@ title: 设计模式 - 简化调用者操作,创建逻辑剥离到工厂层中,统一管理底层实例。 -- 行为模式 #代码 +- 行为模式 - 责任链模式 diff --git a/note/learn/learn.md b/note/learn/learn.md index bd98220..f981c7f 100644 --- a/note/learn/learn.md +++ b/note/learn/learn.md @@ -38,7 +38,7 @@ [[序列化]] ## tool -[[Anki]] +[[src/anki/anki]] [[obsidian]] ## theory [[编译]] diff --git a/note/learn/lib/yacc.md b/note/learn/lib/yacc.md index 59ecd4a..7d6e079 100644 --- a/note/learn/lib/yacc.md +++ b/note/learn/lib/yacc.md @@ -61,7 +61,7 @@ - 栈类型 - - 默认为**#define YYSTYPE int** + - 默认为**# define YYSTYPE int** 对于终结符的类型,你可以这样定义: diff --git a/note/learn/lib/环境搭建/环境搭建.md b/note/learn/lib/环境搭建/环境搭建.md index 671e2d2..0004a21 100644 --- a/note/learn/lib/环境搭建/环境搭建.md +++ b/note/learn/lib/环境搭建/环境搭建.md @@ -77,19 +77,20 @@ bash Miniconda3-latest-Linux-x86_64.sh #运行 - - start.sh - - - #!/bin/sh - result=`ps -ef | grep -o jupyter-notebook` - array=(`echo $result | tr ' ' ' '` ) - length=${#array[@]} - #kill -9 $(ps -ef | grep jupyter-notebook | grep -v grep | awk '{print $2}') - if [ $length -gt 2 ] - then - echo "jupyter-notebook is running" - else - `nohup jupyter notebook --allow-root > /data/jupyter.log 2>&1 &` - echo "start success jupyter-notebook" - fi +``` +#!/bin/sh +result=`ps -ef | grep -o jupyter-notebook` +array=(`echo $result | tr ' ' ' '` ) +length=${#array[@]} +#kill -9 $(ps -ef | grep jupyter-notebook | grep -v grep | awk '{print $2}') +if [ $length -gt 2 ] +then + echo "jupyter-notebook is running" +else + `nohup jupyter notebook --allow-root > /data/jupyter.log 2>&1 &` + echo "start success jupyter-notebook" +fi +``` ## 更新 pip 源 diff --git a/readme.md b/readme.md index 90212ac..5f82d66 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ - +## 笔记类型 #readme - 记录每天的计划事项,完成事项,总结经验 - ### [[content/plan|计划清单 ]] - #### [[content/diary|日记]] diff --git a/note/learn/tool/Anki.md b/src/anki/anki.md similarity index 100% rename from note/learn/tool/Anki.md rename to src/anki/anki.md diff --git a/note/learn/tool/obsidian.md b/src/obsidian/obsidian.md similarity index 55% rename from note/learn/tool/obsidian.md rename to src/obsidian/obsidian.md index e6ca6eb..1528739 100644 --- a/note/learn/tool/obsidian.md +++ b/src/obsidian/obsidian.md @@ -1,10 +1,21 @@ +--- +tags: note/tool/obsidian +creation date: 2023-08-25 15:32 +modification date: 星期五 25日 八月 2023 19:35:15 +--- ## Obsidian +[官网](https://obsidian.md/Obsidian) ### 语法 - 链接 - \[名字\](地址) -- 内嵌 - - 地址 -### 插件 +- 双链 + - [[templater]] +- 标签 + - #note + - #note/tool + - #note/tool/obsidian +### 实用插件 +需先打开 [[fastgithub]] 才能访问插件 - 开发 - [API](https://github.com/obsidianmd/obsidian-api) - [Sample](https://github.com/obsidianmd/obsidian-sample-plugin) @@ -14,6 +25,10 @@ - [Juggl](https://github.com/HEmile/juggl/) - [Kanban](https://github.com/mgmeyers/obsidian-kanban) - [PlantUml](https://github.com/joethei/obsidian-plantuml) + - [Tamplate](https://silentvoid13.github.io/Templater/introduction.html) + + + + + -## 插件 -### Templater diff --git a/src/obsidian/templater.md b/src/obsidian/templater.md new file mode 100644 index 0000000..36db523 --- /dev/null +++ b/src/obsidian/templater.md @@ -0,0 +1,88 @@ +# templater +## 示例 +``` +--- +creation date: <% tp.file.creation_date() %> +modification date: <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> +--- + +<< [[<% tp.date.now("YYYY-MM-DD", -1) %>]] | [[<% tp.date.now("YYYY-MM-DD", 1) %>]] >> +# <% tp.file.title %> +<% tp.web.daily_quote() %> + +``` + +## 配置 + +### 模板目录 + +- /template + +### 脚本目录 +/template/script +用户自定义脚本 +### 指定模板文件夹 + +- /diary & /template/diary + +### 指定模板热键 +- 暂时不用,貌似容易冲突 + +## 语法 +### 代码块 +``` + <% tp.date.now("YYYY-MM-DD", -1) %> +``` +### 函数原型 +[api](https://silentvoid13.github.io/Templater/internal-functions/overview.html) +```javascript +tp.date.now(format: string = "YYYY-MM-DD", offset?: number|string, reference?: string, reference_format?: string) +tp.date.tomorrow(format: string = "YYYY-MM-DD") +tp.date.weekday(format: string = "YYYY-MM-DD", weekday: number, reference?: string, reference_format?: string) +tp.date.yesterday(format: string = "YYYY-MM-DD") + +tp.file.content +tp.file.create_new(template: TFile | string, filename?: string, open_new: boolean = false, folder?: TFolder) +tp.file.creation_date(format: string = "YYYY-MM-DD HH:mm") +tp.file.cursor(order?: number) +tp.file.cursor_append(content: string) +tp.file.exists(filename: string) +tp.file.find_tfile(filename: string) +tp.file.folder(relative: boolean = false) +tp.file.include(include_link: string | TFile) +tp.file.last_modified_date(format: string = "YYYY-MM-DD HH:mm") +tp.file.move(new_path: string, file_to_move?: TFile) +tp.file.path(relative: boolean = false) +tp.file.rename(new_title: string) +tp.file.selection() +tp.file.tags +tp.file.title + +tp.system.clipboard() +tp.system.prompt(prompt_text?: string, default_value?: string, throw_on_cancel: boolean = false, multiline?: boolean = false) +tp.system.suggester(text_items: string[] | ((item: T) => string), items: T[], throw_on_cancel: boolean = false, placeholder: string = "", limit?: number = undefined) + +tp.web.daily_quote() +tp.web.random_picture(size?: string, query?: string, include_size?: boolean) +``` + + +# 联合 + +## 日记 +- 日期格式 YYYY-MM-DD +- 存放位置 diary/2023 +- 模板位置 [[template/diary/_diary]] + +## 日历 +- 日记 点击日期 +- 周报 点击周数 + +## Periodic Notes +- 月报 +- 季报 +- 年报 +怎么创建呢? +## 看版 +- 模板 +- 笔记目录 diff --git a/note/learn/lib/xmake/xmake API.md b/src/xmake/xmake API.md similarity index 100% rename from note/learn/lib/xmake/xmake API.md rename to src/xmake/xmake API.md diff --git a/note/learn/lib/xmake/xmake 使用.md b/src/xmake/xmake 使用.md similarity index 100% rename from note/learn/lib/xmake/xmake 使用.md rename to src/xmake/xmake 使用.md diff --git a/note/learn/lib/xmake/xmake 库.md b/src/xmake/xmake 库.md similarity index 100% rename from note/learn/lib/xmake/xmake 库.md rename to src/xmake/xmake 库.md diff --git a/note/learn/lib/xmake/xmake 源码.md b/src/xmake/xmake 源码.md similarity index 100% rename from note/learn/lib/xmake/xmake 源码.md rename to src/xmake/xmake 源码.md diff --git a/note/learn/lib/xmake/xmake 解析.md b/src/xmake/xmake 解析.md similarity index 100% rename from note/learn/lib/xmake/xmake 解析.md rename to src/xmake/xmake 解析.md diff --git a/note/learn/lib/xmake/xmake.md b/src/xmake/xmake.md similarity index 100% rename from note/learn/lib/xmake/xmake.md rename to src/xmake/xmake.md diff --git a/template/_base.md b/template/_base.md new file mode 100644 index 0000000..8f675dd --- /dev/null +++ b/template/_base.md @@ -0,0 +1,8 @@ +--- +aliases: +tags: +creation date: <% tp.file.creation_date() %> +modification date: <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> +--- +# <% tp.file.title %> + diff --git a/template/_kanban.md b/template/_kanban.md new file mode 100644 index 0000000..afbf851 --- /dev/null +++ b/template/_kanban.md @@ -0,0 +1,30 @@ +--- +tags: task/todo +creation date: <% tp.file.creation_date() %> +modification date: <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> +kanban-plugin: basic +--- + +## #task/todo + +- [ ] #task/p11#<% tp.file.creation_date("YYYY/MM")%>
规划 + + +## #task/doing + +- [ ] #task/p11#<% tp.file.creation_date("YYYY/MM")%>
进行中 + +## #task/done +**完成** +- [ ] #task/p11#<% tp.file.creation_date("YYYY/MM")%>
已完成 + +## #task/delay +- [ ] #task/p11#<% tp.file.creation_date("YYYY/MM")%>
延后 + + + +%% kanban:settings +``` +{"kanban-plugin":"basic"} +``` +%% \ No newline at end of file diff --git a/template/diary/_diary.md b/template/diary/_diary.md new file mode 100644 index 0000000..bd449c5 --- /dev/null +++ b/template/diary/_diary.md @@ -0,0 +1,28 @@ +--- +tags: anki/word , task/todo +creation date: <% tp.file.creation_date() %> +modification date: <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> +--- + +<< [[<% tp.date.now("YYYY-MM-DD", -1) %>]] | [[<% tp.date.now("YYYY-MM-DD", 1) %>]] >> + +# <% tp.file.title %> + +#task/todo +## TODO +### 工作 +- [ ] 1. +- [ ] 2. +### 学习 +- [ ] 1. +- [ ] 2. +### 生活 +- [ ] 1. +- [ ] 2. + +## 总结 +- [ ] 1. +- [ ] 2. + + +#anki/word diff --git a/template/diary/_month.md b/template/diary/_month.md new file mode 100644 index 0000000..e69de29 diff --git a/template/diary/_quarterly.md b/template/diary/_quarterly.md new file mode 100644 index 0000000..e69de29 diff --git a/template/diary/_week.md b/template/diary/_week.md new file mode 100644 index 0000000..119eff4 --- /dev/null +++ b/template/diary/_week.md @@ -0,0 +1,27 @@ +--- +tags: anki/word , task/todo +creation date: <% tp.file.creation_date() %> +modification date: <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> +--- + +<< [[<% tp.date.now("YYYY-MM", -7) %>]] | [[<% tp.date.now("YYYY-MM", 7) %>]] >> + +# <% tp.file.title %> + +#task/todo +## TODO +### 工作 +- [ ] 1. +- [ ] 2. +### 学习 +- [ ] 1. +- [ ] 2. +### 生活 +- [ ] 1. +- [ ] 2. + +## 总结 +- [ ] 1. +- [ ] 2. + + diff --git a/template/diary/_year.md b/template/diary/_year.md new file mode 100644 index 0000000..e69de29