1774767884
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB |
@@ -0,0 +1,7 @@
|
||||
<%*
|
||||
const vaultPath = tp.app.vault.adapter.basePath;
|
||||
const command = `wt -d "${vaultPath}"`;
|
||||
const { exec } = require("node:child_process");
|
||||
exec(command);
|
||||
return "";
|
||||
-%>
|
||||
@@ -0,0 +1,11 @@
|
||||
<%*
|
||||
const name = tp.date.now("YYYY-MM-DD_HH-mm-ss");
|
||||
await tp.file.rename(name);
|
||||
setTimeout(() => {
|
||||
const editor = app.workspace.activeEditor?.editor;
|
||||
if (editor) {
|
||||
editor.setCursor(0, 0);
|
||||
editor.focus();
|
||||
}
|
||||
}, 150);
|
||||
-%>
|
||||
@@ -1,4 +1,7 @@
|
||||
# 需求1
|
||||
<%*
|
||||
await tp.file.rename("开发笔记");
|
||||
-%>
|
||||
# 需求 1
|
||||
|
||||
## 需求评审
|
||||
|
||||
@@ -12,7 +15,7 @@
|
||||
|
||||
|
||||
|
||||
# 需求2
|
||||
# 需求 2
|
||||
|
||||
## 需求评审
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<%*
|
||||
const monthDay = tp.date.now("MMDD");
|
||||
const name = await tp.system.prompt("笔记名称", "");
|
||||
if (name) {
|
||||
await tp.file.rename(monthDay + "-" + name);
|
||||
}
|
||||
-%>
|
||||
---
|
||||
日期: <% tp.date.now("YYYY-MM-DD HH:mm") %>
|
||||
来源:
|
||||
|
||||
Reference in New Issue
Block a user