From 10c4221719ff44dd9dce87101e69f45011fa5710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AA=E5=AD=90?= Date: Sun, 26 May 2024 09:05:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +- .../70bcb53e835ead5d2ab33ef867e3bebb.txt | 1 - content/zh-cn/memo/61.md | 14 +++++++ content/zh-cn/memo/62.md | 7 ++++ .../posts/.obsidian/community-plugins.json | 4 +- .../.obsidian/plugins/quickadd/data.json | 4 +- content/zh-cn/posts/.obsidian/workspace.json | 32 +++++----------- content/zh-cn/posts/1.md | 0 obs_sctipts/NewBlog.js | 38 +++++++++++++++++++ 9 files changed, 76 insertions(+), 27 deletions(-) delete mode 100644 content/zh-cn/70bcb53e835ead5d2ab33ef867e3bebb.txt create mode 100644 content/zh-cn/memo/62.md delete mode 100644 content/zh-cn/posts/1.md create mode 100644 obs_sctipts/NewBlog.js diff --git a/.gitignore b/.gitignore index a0ab18f..16d732a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ public/ .hugo_build.lock resources/ -.DS_Store \ No newline at end of file +.DS_Store +.obsidian \ No newline at end of file diff --git a/content/zh-cn/70bcb53e835ead5d2ab33ef867e3bebb.txt b/content/zh-cn/70bcb53e835ead5d2ab33ef867e3bebb.txt deleted file mode 100644 index 05ee830..0000000 --- a/content/zh-cn/70bcb53e835ead5d2ab33ef867e3bebb.txt +++ /dev/null @@ -1 +0,0 @@ -4058ad46960b046136801c9789bb782ce757826b diff --git a/content/zh-cn/memo/61.md b/content/zh-cn/memo/61.md index ae2b5da..8cfbb9f 100644 --- a/content/zh-cn/memo/61.md +++ b/content/zh-cn/memo/61.md @@ -2,4 +2,18 @@ title: "无力吐槽苹果" date: 2024-05-08T11:44:57+08:00 --- +--- +title: "2022年12月8日终于全国防疫放开管控了" +date: 2022-12-08T02:23:00.000Z + +--- + +坚持了三年的疫情,终于在昨天放开管控了。 +这意味着疫情的危害已然不如爆发之初的恐怖杀伤力了。 +但是这一切不能不防。 +很多阳过的朋友在网络上分享自己的心得。 +各种囤积的必备药物。 +还有被阳性包围保持阴性的必胜法宝。那就是口罩。 如果不想被阳,带口罩还是非常有必要的。 + +这一次终于我可以到处溜达了。 升级IOS17之后小米无线充电器就无法使用了 \ No newline at end of file diff --git a/content/zh-cn/memo/62.md b/content/zh-cn/memo/62.md new file mode 100644 index 0000000..0ae6d9a --- /dev/null +++ b/content/zh-cn/memo/62.md @@ -0,0 +1,7 @@ +--- +title: 庆余年2 +date: 2024-05-26T09:03:17+0800 +feature: +--- +故事还可以,就是有些情节魔改的厉害了. +跟原著紧张的气氛不同的是多了几分诙谐 \ No newline at end of file diff --git a/content/zh-cn/posts/.obsidian/community-plugins.json b/content/zh-cn/posts/.obsidian/community-plugins.json index f491c78..6c6e17f 100644 --- a/content/zh-cn/posts/.obsidian/community-plugins.json +++ b/content/zh-cn/posts/.obsidian/community-plugins.json @@ -1,4 +1,6 @@ [ "buttons", - "quickadd" + "quickadd", + "obsidian-git", + "templater-obsidian" ] \ No newline at end of file diff --git a/content/zh-cn/posts/.obsidian/plugins/quickadd/data.json b/content/zh-cn/posts/.obsidian/plugins/quickadd/data.json index b1ebb3a..865f546 100644 --- a/content/zh-cn/posts/.obsidian/plugins/quickadd/data.json +++ b/content/zh-cn/posts/.obsidian/plugins/quickadd/data.json @@ -12,7 +12,7 @@ "devMode": false, "templateFolderPath": "", "announceUpdates": true, - "version": "0.14.0", + "version": "1.8.1", "disableOnlineFeatures": true, "ai": { "defaultModel": "Ask me", @@ -63,6 +63,6 @@ "incrementFileNameSettingMoveToDefaultBehavior": true, "mutualExclusionInsertAfterAndWriteToBottomOfFile": true, "setVersionAfterUpdateModalRelease": true, - "addDefaultAIProviders": false + "addDefaultAIProviders": true } } \ No newline at end of file diff --git a/content/zh-cn/posts/.obsidian/workspace.json b/content/zh-cn/posts/.obsidian/workspace.json index 2090d30..1c2f4bd 100644 --- a/content/zh-cn/posts/.obsidian/workspace.json +++ b/content/zh-cn/posts/.obsidian/workspace.json @@ -18,21 +18,8 @@ "source": false } } - }, - { - "id": "b92342483b71e489", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "为Memos增加twikoo评论.md", - "mode": "source", - "source": false - } - } } - ], - "currentTab": 1 + ] } ], "direction": "vertical" @@ -61,7 +48,7 @@ "state": { "type": "search", "state": { - "query": "add", + "query": "", "matchingCase": false, "explainSearch": false, "collapseAll": false, @@ -99,7 +86,7 @@ "state": { "type": "backlink", "state": { - "file": "为Memos增加twikoo评论.md", + "file": "Moments.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -116,7 +103,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "为Memos增加twikoo评论.md", + "file": "Moments.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -139,7 +126,7 @@ "state": { "type": "outline", "state": { - "file": "为Memos增加twikoo评论.md" + "file": "Moments.md" } } } @@ -157,16 +144,17 @@ "canvas:新建白板": false, "daily-notes:打开/创建今天的日记": false, "templates:插入模板": false, - "command-palette:打开命令面板": false + "command-palette:打开命令面板": false, + "templater-obsidian:Templater": false } }, - "active": "2efb4c2d02f0a7c4", + "active": "2c1da5bfefdfe47c", "lastOpenFiles": [ - "未命名.md", + "1.md", "为Memos增加twikoo评论.md", + "未命名.md", "Moments.md", "memos-api-call-rendering-page.md", - "1.md", "small-sheep-snh48-xu-yang-yuzhuo.md", "wechat-keyboard-online.md", "ypecho文章内的超链接在新窗口打开.md", diff --git a/content/zh-cn/posts/1.md b/content/zh-cn/posts/1.md deleted file mode 100644 index e69de29..0000000 diff --git a/obs_sctipts/NewBlog.js b/obs_sctipts/NewBlog.js new file mode 100644 index 0000000..8ab56a7 --- /dev/null +++ b/obs_sctipts/NewBlog.js @@ -0,0 +1,38 @@ +const util = require('util'); +const child_process = require('child_process'); +const exec = util.promisify(child_process.exec); + + +function getCreateTimeAsFileName() { + var d = new Date(); + var year = d.getFullYear(); + var month = d.getMonth()+1; + var day = d.getDate(); + var hour = d.getHours(); + var minute = d.getMinutes(); + var second = d.getSeconds(); + var time = year+"m"+month+"d"+day+"h"+hour+"m"+minute+"s"+second; + return time; +} + + + +// execute command function + +async function executeCommand() { + const fileName = getCreateTimeAsFileName()+".md"; + const { stdout, stderr } = await exec('hugo new posts/' +fileName,{cwd: app.fileManager.vault.adapter.basePath}); + console.log('stdout:', stdout); + console.log('stderr:', stderr); + if (stdout) { + new Notice("New Blog Created["+fileName+"]") + }else{ + new Notice("New Blog Create Faild. "+stderr) + } +} + + + +module.exports = async function(context, req) { + await executeCommand(); +}