Skip to content

Instantly share code, notes, and snippets.

@jdpilgrim
Created December 14, 2022 19:10
Show Gist options
  • Save jdpilgrim/4e9cf82c5db67f3a221f94e8323f8c80 to your computer and use it in GitHub Desktop.
Save jdpilgrim/4e9cf82c5db67f3a221f94e8323f8c80 to your computer and use it in GitHub Desktop.
Obsidian template for a calendar entry with the current time
<%*
let originalTitle = tp.file.title
title = await tp.system.prompt("Title");
await tp.file.rename(`${originalTitle} ${title}`);
tR += "---"
%>
title: <%* tR += `${title}` %>
allDay: false
date: <% tp.file.creation_date("YYYY-MM-DD") %>
startTime: <% tp.file.creation_date("HH:mm") %>
endTime: <% tp.file.creation_date("HH:mm") %>
completed: null
tags: []
---
# <% `${title}` %>
<% tp.file.cursor(1) %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment