From 58bddec2fe2f3bd792eebbed5f6db2d18ebfc25b Mon Sep 17 00:00:00 2001 From: Amadou Date: Fri, 14 Aug 2026 13:25:15 -0400 Subject: [PATCH] vault backup: 2026-08-14 13:25:15 --- 10 Knowledge/Templates/Decision Template.md | 118 ++++++++++++------ 20 Work/Decisions/2026/07/.gitkeep | 0 .../{ => 07}/Decision to stay with Algolia.md | 0 20 Work/Decisions/2026/08/.gitkeep | 0 ...-08-07 - Pay Trings for the french tabs.md | 0 .../2026-08-13 - Proposition synchro v2.md | 0 ...aire un test live avant le 17 septembre.md | 58 +++++++++ ... Sonia et Philippe pour expliquer l'OTT.md | 0 8 files changed, 140 insertions(+), 36 deletions(-) create mode 100644 20 Work/Decisions/2026/07/.gitkeep rename 20 Work/Decisions/2026/{ => 07}/Decision to stay with Algolia.md (100%) create mode 100644 20 Work/Decisions/2026/08/.gitkeep rename 20 Work/Decisions/2026/{ => 08}/2026-08-07 - Pay Trings for the french tabs.md (100%) rename 20 Work/Decisions/2026/{ => 08}/2026-08-13 - Proposition synchro v2.md (100%) create mode 100644 20 Work/Decisions/2026/08/2026-08-14 - OTT - Faire un test live avant le 17 septembre.md rename 20 Work/Decisions/2026/{ => 08}/2026-08-14 - Rencontrer Sonia et Philippe pour expliquer l'OTT.md (100%) diff --git a/10 Knowledge/Templates/Decision Template.md b/10 Knowledge/Templates/Decision Template.md index 10b9bbd..9131979 100644 --- a/10 Knowledge/Templates/Decision Template.md +++ b/10 Knowledge/Templates/Decision Template.md @@ -2,6 +2,8 @@ date: <% tp.date.now("YYYY-MM-DD") %> status: proposed owner: Amadou +project: +--- --- <%* @@ -25,31 +27,34 @@ const safeTitle = title .trim(); // -------------------------------------------------- -// 2. Find available projects for the current year +// 2. Find project folders for current year // -------------------------------------------------- const projectsFolder = `20 Work/Projects/${year}`; +const projectsRoot = app.vault.getAbstractFileByPath(projectsFolder); -const projectFiles = app.vault - .getMarkdownFiles() - .filter(file => file.parent?.path === projectsFolder) - .sort((a, b) => a.basename.localeCompare(b.basename)); +let projectFolders = []; + +if (projectsRoot && projectsRoot.children) { + projectFolders = projectsRoot.children + .filter(item => item.children) + .sort((a, b) => a.name.localeCompare(b.name)); +} + +// -------------------------------------------------- +// 3. Project dropdown +// -------------------------------------------------- -// First option allows a decision with no project const projectLabels = [ "— No project —", - ...projectFiles.map(file => file.basename) + ...projectFolders.map(folder => folder.name) ]; const projectValues = [ null, - ...projectFiles + ...projectFolders ]; -// -------------------------------------------------- -// 3. Ask which project this decision belongs to -// -------------------------------------------------- - const selectedProject = await tp.system.suggester( projectLabels, projectValues, @@ -57,14 +62,21 @@ const selectedProject = await tp.system.suggester( "Related project" ); -// Cancelling the modal cancels note creation if (selectedProject === undefined) { new Notice("Decision cancelled."); return; } +const projectName = selectedProject + ? selectedProject.name + : ""; + +const projectLink = selectedProject + ? `[[${projectName}]]` + : ""; + // -------------------------------------------------- -// 4. Create Decisions/YYYY/MM folder +// 4. Create Decisions/YYYY/MM // -------------------------------------------------- const baseFolder = "20 Work/Decisions"; @@ -83,58 +95,92 @@ if (!app.vault.getAbstractFileByPath(monthFolder)) { // 5. Build filename // -------------------------------------------------- -let filename; +let filename = `${date} - ${safeTitle}`; if (selectedProject) { - const safeProject = selectedProject.basename + const safeProject = projectName .replace(/[\\/:*?"<>|]/g, "-") .trim(); filename = `${date} - ${safeProject} - ${safeTitle}`; -} else { - filename = `${date} - ${safeTitle}`; } // -------------------------------------------------- -// 6. Move + rename note +// 6. Move + rename // -------------------------------------------------- -await tp.file.move( - `${monthFolder}/${filename}` -); +await tp.file.move(`${monthFolder}/${filename}`); -// Make project available later in the template -const projectLink = selectedProject - ? `[[${selectedProject.basename}]]` - : ""; +// -------------------------------------------------- +// 7. Update Properties AFTER Templater finishes +// -------------------------------------------------- + +tp.hooks.on_all_templates_executed(async () => { + + const file = tp.file.find_tfile( + `${monthFolder}/${filename}` + ); + + if (!file) return; + + await tp.app.fileManager.processFrontMatter( + file, + (frontmatter) => { + frontmatter.date = date; + frontmatter.status = "proposed"; + frontmatter.owner = "Amadou"; + frontmatter.project = projectLink; + } + ); +}); -%> > 🟡 **Proposed** · 🟢 **Decided** · 🔴 **Rejected** · ⚫ **Superseded** ## Context +Why is a decision needed? + <% tp.file.cursor() %> -## Options Considered *(optional)* +## Options Considered _(optional)_ -- **Option 1** - - Pros: - - Cons: +### Option 1 -- **Option 2** - - Pros: - - Cons: +**Description:** + +**Pros:** +- + +**Cons:** +- + +### Option 2 + +**Description:** + +**Pros:** +- + +**Cons:** +- ## Decision +What was decided? + ## Why -- +Why was this option chosen? + +- ## Consequences -- +What are we accepting by making this decision? + +- ## Related -- [[]] \ No newline at end of file +<% projectLink ? `- ${projectLink}` : "-" %> \ No newline at end of file diff --git a/20 Work/Decisions/2026/07/.gitkeep b/20 Work/Decisions/2026/07/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/20 Work/Decisions/2026/Decision to stay with Algolia.md b/20 Work/Decisions/2026/07/Decision to stay with Algolia.md similarity index 100% rename from 20 Work/Decisions/2026/Decision to stay with Algolia.md rename to 20 Work/Decisions/2026/07/Decision to stay with Algolia.md diff --git a/20 Work/Decisions/2026/08/.gitkeep b/20 Work/Decisions/2026/08/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/20 Work/Decisions/2026/2026-08-07 - Pay Trings for the french tabs.md b/20 Work/Decisions/2026/08/2026-08-07 - Pay Trings for the french tabs.md similarity index 100% rename from 20 Work/Decisions/2026/2026-08-07 - Pay Trings for the french tabs.md rename to 20 Work/Decisions/2026/08/2026-08-07 - Pay Trings for the french tabs.md diff --git a/20 Work/Decisions/2026/2026-08-13 - Proposition synchro v2.md b/20 Work/Decisions/2026/08/2026-08-13 - Proposition synchro v2.md similarity index 100% rename from 20 Work/Decisions/2026/2026-08-13 - Proposition synchro v2.md rename to 20 Work/Decisions/2026/08/2026-08-13 - Proposition synchro v2.md diff --git a/20 Work/Decisions/2026/08/2026-08-14 - OTT - Faire un test live avant le 17 septembre.md b/20 Work/Decisions/2026/08/2026-08-14 - OTT - Faire un test live avant le 17 septembre.md new file mode 100644 index 0000000..d0ce993 --- /dev/null +++ b/20 Work/Decisions/2026/08/2026-08-14 - OTT - Faire un test live avant le 17 septembre.md @@ -0,0 +1,58 @@ +--- +date: 2026-08-14 +status: proposed +owner: Amadou +project: "[[OTT]]" +--- +--- + + +> 🟡 **Proposed** · 🟢 **Decided** · 🔴 **Rejected** · ⚫ **Superseded** + +## Context + +Why is a decision needed? +Afin d'éviter toute surprise le jour J de l'émission, nous allons faire un vrai tes + + +## Options Considered _(optional)_ + +### Option 1 + +**Description:** + +**Pros:** +- + +**Cons:** +- + +### Option 2 + +**Description:** + +**Pros:** +- + +**Cons:** +- + +## Decision + +What was decided? + +## Why + +Why was this option chosen? + +- + +## Consequences + +What are we accepting by making this decision? + +- + +## Related + +- [[OTT]] \ No newline at end of file diff --git a/20 Work/Decisions/2026/2026-08-14 - Rencontrer Sonia et Philippe pour expliquer l'OTT.md b/20 Work/Decisions/2026/08/2026-08-14 - Rencontrer Sonia et Philippe pour expliquer l'OTT.md similarity index 100% rename from 20 Work/Decisions/2026/2026-08-14 - Rencontrer Sonia et Philippe pour expliquer l'OTT.md rename to 20 Work/Decisions/2026/08/2026-08-14 - Rencontrer Sonia et Philippe pour expliquer l'OTT.md