Initial commit
This commit is contained in:
35
.trash/Template/Daily note template old.md
Normal file
35
.trash/Template/Daily note template old.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
categories: Daily note
|
||||
tags:
|
||||
- daily
|
||||
date: <% tp.date.now("YYYY-MM-DD") %>
|
||||
created: <% tp.date.now("YYYY-MM-DDTHH:mm:ssZ") %>
|
||||
updated: <% tp.date.now("YYYY-MM-DDTHH:mm:ssZ") %>
|
||||
---
|
||||
[[Home]] | [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>|Yesterday]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>|Tomorrow]]
|
||||
``` dataview
|
||||
TABLE rows.file.link as "Task"
|
||||
FROM "TaskNotes"
|
||||
WHERE (completed = this.date) OR (status = "in-progress")
|
||||
OR (((status != "done" AND status != "cancelled") AND
|
||||
((start AND start <= this.date) OR
|
||||
(scheduled AND scheduled <= this.date) OR
|
||||
(due AND due <= this.date)))
|
||||
)
|
||||
GROUP BY status
|
||||
SORT rows.priority ASC, rows.due ASC
|
||||
```
|
||||
# notepad
|
||||
- [ ]
|
||||
|
||||
# daily log
|
||||
|
||||
# [[daily-reflection|daily reflection]]
|
||||
|
||||
## what happened today
|
||||
|
||||
|
||||
|
||||
---
|
||||
Log:
|
||||
- <% tp.date.now("YYYY-MM-DDTHH:mm:ss") %>: Daily note created.
|
||||
0
.trash/Template/Deep Note-Taking Template.md
Normal file
0
.trash/Template/Deep Note-Taking Template.md
Normal file
14
.trash/Template/Drawing 2025-11-30 21.24.55.excalidraw.md
Normal file
14
.trash/Template/Drawing 2025-11-30 21.24.55.excalidraw.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
|
||||
excalidraw-plugin: parsed
|
||||
tags: [excalidraw]
|
||||
|
||||
---
|
||||
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠== You can decompress Drawing data with the command palette: 'Decompress current Excalidraw file'. For more info check in plugin settings under 'Saving'
|
||||
|
||||
|
||||
## Drawing
|
||||
```compressed-json
|
||||
N4IgLgngDgpiBcIYA8DGBDANgSwCYCd0B3EAGhADcZ8BnbAewDsEAmcm+gV31TkQAswYKDXgB6MQHNsYfpwBGAOlT0AtmIBeNCtlQbs6RmPry6uA4wC0KDDgLFLUTJ2lH8MTDHQ0YNMWHRJMRZFAEYAdkUWMiRPVRhGMBoEAG0AXXJ0KCgAZQCwPlBJfDwc7A0+Rk5MTHIdGCIAIXRUAGtirkZcAGF6THp8BBAAYgAzcYmQAF8poA===
|
||||
```
|
||||
%%
|
||||
1
.trash/Template/Log entry.md
Normal file
1
.trash/Template/Log entry.md
Normal file
@@ -0,0 +1 @@
|
||||
<%* await tp.user.update_front_matter_and_log(tp) %>
|
||||
11
.trash/Template/New Note.md
Normal file
11
.trash/Template/New Note.md
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
created: <% tp.date.now("YYYY-MM-DDTHH:mm:ssZ") %>
|
||||
updated: <% tp.date.now("YYYY-MM-DDTHH:mm:ssZ") %>
|
||||
source:
|
||||
topic:
|
||||
---
|
||||
|
||||
|
||||
---
|
||||
Log:
|
||||
- <% tp.date.now("YYYY-MM-DDTHH:mm:ss") %>: Note created
|
||||
10
.trash/Template/People Old Template.md
Normal file
10
.trash/Template/People Old Template.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
created: 2026-01-04T15:41:42+00:00
|
||||
updated: 2026-01-04T15:41:42+00:00
|
||||
aliases:
|
||||
---
|
||||
|
||||
|
||||
---
|
||||
Log:
|
||||
- 2026-01-04T15:41:42: Note created
|
||||
1
.trash/Template/Timestamp.md
Normal file
1
.trash/Template/Timestamp.md
Normal file
@@ -0,0 +1 @@
|
||||
<% tp.date.now("YYYY-MM-DDTHH:mm:ss") %>:
|
||||
16
.trash/Template/scripts/daily_note_tasks_query_builder.js
Normal file
16
.trash/Template/scripts/daily_note_tasks_query_builder.js
Normal file
@@ -0,0 +1,16 @@
|
||||
function daily_note_tasks_query_builder(tp) {
|
||||
// 1. Parse the file title using the custom format YYYY.MM.DD.dd
|
||||
const date = moment(tp.file.title, "YYYY.MM.DD.dd").format("YYYY-MM-DD");
|
||||
|
||||
// 2. Construct the full query string using the static date
|
||||
const query =
|
||||
`
|
||||
((not done) OR (done on ${date}))
|
||||
(((has start date) AND (starts on or before ${date})) OR (scheduled on or before ${date}) OR (due on or before ${date}))
|
||||
short mode
|
||||
`;
|
||||
|
||||
// 3. Wrap the query in the necessary ```tasks block and return it
|
||||
return "```tasks" + query + "```";
|
||||
}
|
||||
module.exports = daily_note_tasks_query_builder;
|
||||
38
.trash/Template/scripts/update_front_matter_and_log.js
Normal file
38
.trash/Template/scripts/update_front_matter_and_log.js
Normal file
@@ -0,0 +1,38 @@
|
||||
// NOTE: We change the function arguments back to accept the Templater object (tp)
|
||||
// This is required when running the script directly via a Templater hotkey.
|
||||
async function update_front_matter_and_log(tp) {
|
||||
// 1. Define timestamps (using the reliable tp.date.now)
|
||||
const timestamp = tp.date.now("YYYY-MM-DDTHH:mm:ssZ");
|
||||
|
||||
// Get the current file object
|
||||
const file = app.workspace.getActiveFile();
|
||||
if (!file) {
|
||||
// Must throw an error here, otherwise Templater might insert 'undefined' text.
|
||||
throw new Error("No active file is open to update.");
|
||||
}
|
||||
|
||||
// 2. Update Frontmatter Property ('updated')
|
||||
await app.fileManager.processFrontMatter(file, (frontmatter) => {
|
||||
frontmatter['updated'] = timestamp;
|
||||
});
|
||||
|
||||
// 3. Prepare the Log Entry Text
|
||||
const logEntry = `\n- ${timestamp}: `;
|
||||
|
||||
// 4. Append the text to the bottom of the note body
|
||||
// Using app.vault.modify is the safest way to append text at the end of a file.
|
||||
await app.vault.append(file, logEntry);
|
||||
|
||||
// 5. Place the cursor at the end of the newly inserted text
|
||||
// This allows the user to immediately type the revision summary.
|
||||
|
||||
// Get the current editor object
|
||||
const editor = app.workspace.activeEditor.editor;
|
||||
|
||||
// Move cursor to the end of the file/newly added text (simulating an insertion)
|
||||
editor.setCursor(editor.lastLine() + 1);
|
||||
|
||||
// TEMPLATER RULE: Return an empty string so nothing else gets inserted by Templater
|
||||
return "";
|
||||
}
|
||||
module.exports = update_front_matter_and_log;
|
||||
Reference in New Issue
Block a user