Created
December 5, 2022 17:21
-
-
Save jdpilgrim/0289d5d3d67315125946749db5ce20a5 to your computer and use it in GitHub Desktop.
Obsidian top matter for actions. Asks for a title
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%* | |
let originalTitle = tp.file.title | |
if (originalTitle.startsWith("Untitled")) { | |
originalTitle = tp.file.creation_date("YYYY-MM-DD") | |
} | |
title = await tp.system.prompt("Title"); | |
await tp.file.rename(`${originalTitle} ${title}`); | |
tR += "---" | |
%> | |
title: <%* tR += `${title}` %> | |
allDay: true | |
date: <% tp.file.creation_date("YYYY-MM-DD") %> | |
startTime: <% tp.file.creation_date("HH:mm") %> | |
endTime: | |
completed: false | |
tags: [action, ] | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment