62 lines
906 B
Markdown
62 lines
906 B
Markdown
|
|
<%*
|
|
const date = tp.date.now("YYYY-MM-DD");
|
|
const year = tp.date.now("YYYY");
|
|
|
|
const title = await tp.system.prompt("Decision title");
|
|
|
|
if (!title) {
|
|
new Notice("Decision cancelled: no title entered.");
|
|
return;
|
|
}
|
|
|
|
const safeTitle = title
|
|
.replace(/[\\/:\*?"<>|]/g, "-")
|
|
.trim();
|
|
|
|
const baseFolder = "20 Work/Decisions";
|
|
const yearFolder = `${baseFolder}/${year}`;
|
|
|
|
if (!app.vault.getAbstractFileByPath(yearFolder)) {
|
|
await app.vault.createFolder(yearFolder);
|
|
}
|
|
|
|
await tp.file.move(
|
|
`${yearFolder}/${date} - ${safeTitle}`
|
|
);
|
|
-%>
|
|
|
|
**Date:** <% date %>
|
|
**Status:** 🟡 Proposed
|
|
**Owner:**
|
|
|
|
> 🟡 **Proposed** · 🟢 **Decided** · 🔴 **Rejected** · ⚫ **Superseded**
|
|
|
|
## Context
|
|
|
|
<% tp.file.cursor() %>
|
|
|
|
## Options Considered *(optional)*
|
|
|
|
- **Option 1:**
|
|
- Pros:
|
|
- Cons:
|
|
|
|
- **Option 2:**
|
|
- Pros:
|
|
- Cons:
|
|
|
|
## Decision
|
|
|
|
## Why
|
|
|
|
-
|
|
|
|
## Consequences
|
|
|
|
-
|
|
|
|
## Related
|
|
|
|
- [[]]
|