const {createYamlProperty} = this.app.plugins.plugins["metaedit"].api;
const {createButton} = app.plugins.plugins["buttons"];
const buttonMaker = (pn, fpath) => {
const btn = this.container.createEl('button', {"text": "Done!"});
const file = this.app.vault.getAbstractFileByPath(fpath)
btn.addEventListener('click', async (evt) => {
evt.preventDefault();
const d = new Date(Date.now());
await createYamlProperty(pn, d.toISOString(), fpath);
});
return btn;
};
dv.table(
['Note Name', 'Last review date', ''],
dv.pages().sort(b => b["reviewdate"], "asc").map(b => [
b.file.link,
dv.date(b["reviewdate"]),
buttonMaker('reviewdate', b.file.path)
])
);
Created
July 8, 2022 09:23
-
-
Save kdomanski/005808092b7de1d609d04311bd0acaa0 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment