vault backup: 2026-08-14 13:05:08
This commit is contained in:
@@ -7,6 +7,11 @@ owner: Amadou
|
||||
<%*
|
||||
const date = tp.date.now("YYYY-MM-DD");
|
||||
const year = tp.date.now("YYYY");
|
||||
const month = tp.date.now("MM");
|
||||
|
||||
// --------------------------------------------------
|
||||
// 1. Ask for decision title
|
||||
// --------------------------------------------------
|
||||
|
||||
const title = await tp.system.prompt("Decision title");
|
||||
|
||||
@@ -16,19 +21,92 @@ if (!title) {
|
||||
}
|
||||
|
||||
const safeTitle = title
|
||||
.replace(/[\\/:\*?"<>|]/g, "-")
|
||||
.replace(/[\\/:*?"<>|]/g, "-")
|
||||
.trim();
|
||||
|
||||
// --------------------------------------------------
|
||||
// 2. Find available projects for the current year
|
||||
// --------------------------------------------------
|
||||
|
||||
const projectsFolder = `20 Work/Projects/${year}`;
|
||||
|
||||
const projectFiles = app.vault
|
||||
.getMarkdownFiles()
|
||||
.filter(file => file.parent?.path === projectsFolder)
|
||||
.sort((a, b) => a.basename.localeCompare(b.basename));
|
||||
|
||||
// First option allows a decision with no project
|
||||
const projectLabels = [
|
||||
"— No project —",
|
||||
...projectFiles.map(file => file.basename)
|
||||
];
|
||||
|
||||
const projectValues = [
|
||||
null,
|
||||
...projectFiles
|
||||
];
|
||||
|
||||
// --------------------------------------------------
|
||||
// 3. Ask which project this decision belongs to
|
||||
// --------------------------------------------------
|
||||
|
||||
const selectedProject = await tp.system.suggester(
|
||||
projectLabels,
|
||||
projectValues,
|
||||
false,
|
||||
"Related project"
|
||||
);
|
||||
|
||||
// Cancelling the modal cancels note creation
|
||||
if (selectedProject === undefined) {
|
||||
new Notice("Decision cancelled.");
|
||||
return;
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
// 4. Create Decisions/YYYY/MM folder
|
||||
// --------------------------------------------------
|
||||
|
||||
const baseFolder = "20 Work/Decisions";
|
||||
const yearFolder = `${baseFolder}/${year}`;
|
||||
const monthFolder = `${yearFolder}/${month}`;
|
||||
|
||||
if (!app.vault.getAbstractFileByPath(yearFolder)) {
|
||||
await app.vault.createFolder(yearFolder);
|
||||
}
|
||||
|
||||
if (!app.vault.getAbstractFileByPath(monthFolder)) {
|
||||
await app.vault.createFolder(monthFolder);
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
// 5. Build filename
|
||||
// --------------------------------------------------
|
||||
|
||||
let filename;
|
||||
|
||||
if (selectedProject) {
|
||||
const safeProject = selectedProject.basename
|
||||
.replace(/[\\/:*?"<>|]/g, "-")
|
||||
.trim();
|
||||
|
||||
filename = `${date} - ${safeProject} - ${safeTitle}`;
|
||||
} else {
|
||||
filename = `${date} - ${safeTitle}`;
|
||||
}
|
||||
|
||||
// --------------------------------------------------
|
||||
// 6. Move + rename note
|
||||
// --------------------------------------------------
|
||||
|
||||
await tp.file.move(
|
||||
`${yearFolder}/${date} - ${safeTitle}`
|
||||
`${monthFolder}/${filename}`
|
||||
);
|
||||
|
||||
// Make project available later in the template
|
||||
const projectLink = selectedProject
|
||||
? `[[${selectedProject.basename}]]`
|
||||
: "";
|
||||
-%>
|
||||
|
||||
> 🟡 **Proposed** · 🟢 **Decided** · 🔴 **Rejected** · ⚫ **Superseded**
|
||||
@@ -51,11 +129,11 @@ await tp.file.move(
|
||||
|
||||
## Why
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
## Consequences
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
## Related
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ await tp.file.move(
|
||||
|
||||
## Meetings
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -23,7 +23,7 @@ await tp.file.move(
|
||||
|
||||
<% tp.file.cursor() %>
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -37,7 +37,7 @@ await tp.file.move(
|
||||
|
||||
Feedback given, coaching moments, observations.
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -45,7 +45,7 @@ Feedback given, coaching moments, observations.
|
||||
|
||||
Important project changes only.
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -53,15 +53,15 @@ Important project changes only.
|
||||
|
||||
### What surprised me today?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
### What did I learn today?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
### What would I do differently next time?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Overall health of the department:
|
||||
Traffic light: 🟢 / 🟡 / 🔴
|
||||
|
||||
This week's headline:
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -25,8 +25,8 @@ This week's headline:
|
||||
Things that moved the company forward.
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -53,19 +53,19 @@ Overall morale:
|
||||
|
||||
Who deserves recognition?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Who needs coaching?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Any conflicts?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Any hiring concerns?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -79,11 +79,11 @@ Any hiring concerns?
|
||||
|
||||
Projects slipping:
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Projects completed:
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -97,7 +97,7 @@ Invoices pending?
|
||||
|
||||
Contract risks?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -105,15 +105,15 @@ Contract risks?
|
||||
|
||||
Important numbers this week.
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Anything unusual?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -129,9 +129,9 @@ Decision | Why
|
||||
|
||||
What decisions must be made next week?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -139,11 +139,11 @@ What decisions must be made next week?
|
||||
|
||||
Which meetings created value?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Which meetings should disappear?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Which meetings could become:
|
||||
|
||||
@@ -158,11 +158,11 @@ Which meetings could become:
|
||||
|
||||
What did I unnecessarily do myself?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
What should be delegated next week?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -176,7 +176,7 @@ Podcasts
|
||||
|
||||
Lessons learned
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -186,7 +186,7 @@ Something that annoyed me this week.
|
||||
|
||||
How can I make sure it never happens again?
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
---
|
||||
|
||||
@@ -232,37 +232,37 @@ One thing to improve next week:
|
||||
|
||||
Random ideas to revisit later.
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
|
||||
# CTO Development
|
||||
|
||||
Leadership
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Technology
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Business
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Finance
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
Communication
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
One thing I did this week that made me more like a CTO:
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
One thing I did this week that kept me acting like an individual contributor:
|
||||
|
||||
-
|
||||
-
|
||||
Reference in New Issue
Block a user