vault backup: 2026-04-18 19:02:34

This commit is contained in:
2026-04-18 19:02:34 -04:00
parent 0743e6f194
commit fabb84866b
12 changed files with 541 additions and 37 deletions
+5
View File
@@ -3,6 +3,11 @@ const title = tp.file.title
if (tp.file.content !== "") {
// if file already had content, do nothing
}
else if (/^20\d\d-[01]\d-[0-3]\d_\d\d-\d\d-\d\d$/.test(title)) {
const file = tp.file.find_tfile(tp.file.path(true));
await tp.app.vault.delete(file);
await tp.file.create_new(tp.file.find_tfile("timestamped"), title, true, "timestamped");
}
else if (/^20\d\d-[01]\d-[0-3]\d$/.test(title)) {
const file = tp.file.find_tfile(tp.file.path(true));
await tp.app.vault.delete(file);