Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<%*
const search = app.workspace.getLeavesOfType("search")[0];
search.view.setSortOrder("byCreatedTime");
search.view.setCollapseAll(false);
search.view.setExtraContext(true);
const dnp = tp.date.now('YYYY-MM-DD');
const dnp2 = tp.date.now('YYYY_MM_DD');
let myString = `((file:${dnp2} task-todo:"[ ]") OR ((/Due Date: .*\\[\\[${dnp}\\]\\].*/ OR /due date: \\[[0-9, -]*${dnp}[0-9, -]*\\]/) task-todo:"[ ]") OR (file:${dnp} task-todo:"[ ]") OR (task-todo:"${dnp}") OR section:(/^\#.*${dnp}/ "[ ]") OR section:(/^\#.*${dnp}/ section:("[ ]"))) -file:("weekly review")`;
search.view.setQuery(`${myString}`);
app.workspace.revealLeaf(search);
%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment