1.0 KiB
1.0 KiB
<%-* const subfolderName = "~Deliverables"; const currentDir = app.vault.getAbstractFileByPath(tp.file.path(true)).parent.path; const targetDir = currentDir + "/" + subfolderName; // Ensure the subfolder exists if (!app.vault.getAbstractFileByPath(targetDir)) { await app.vault.createFolder(targetDir); } const title = await tp.system.prompt("Note Title"); await tp.file.create_new("", targetDir + "/" + title, false); let num = await tp.system.prompt("Report Number"); let locall = await tp.system.prompt("Local Link"); let remotel = await tp.system.prompt("Remote Link"); -%>
Type: Resource Resource Type: Report Publisher: Atomic Energy of Canada Ltd. Number: <% num %> Title: <% title %> Author: Local File Link: <% locall %> Remote File Link: <% remotel %> Description: Status: Date Created: <% tp.date.now("DD-MM_MMM-YYYY") %> Date Modified: <% tp.file.last_modified_date("DD-MM_MMM-YYYY") %>
<%* await tp.file.rename("Resource⸬Report-AECL-" + tp.date.now("DDMMYYYYHHMMSS")) %>