Hello, not long started with silverbullet – excited by the potential, but finding quite a steep learning curve for some aspects.
There’s a couple of things could do with a leg up on, to help me on the way:
I want to be able to build a daily journal template.
a. Accessible with a shortcut key, and uses a naming convention like Journal/{today} where today uses the ISO format yyyy-mm-dd
b. At the top is a query for all incomplete tasks with a deadline that has passed or is due today, ideally sorted by this deadline.
The following query seems like a good starting point, just missing the where clauses for incomplete and the deadline, along the the sort by.
${template.each(query[[from index.tag "task" where page == _CTX.currentPage.name]], templates.taskItem)}
I’m not sure how deadlines or due dates are implemented or if they are at all?
c. If possible to able to open journal entries for future dates – .e.g. for planning.
And finally, ideally I’d like to work out a way of excluding personal tasks from work tasks. My thoughts on this would be to perhaps exclude based on a tag on the task, or exclude tasks on a certain page?
Previously there was a attribute extractor in v1, which can translate emoji like structure into deadline something: Migrating from Obsidian-Tasks
Yet this is not working on v2 as the feature attribute extraction has been removed. But the underlying mechanism still works: you can add metadata directly to any of the objects in the SilverBullet.
- [ ] some task [deadline: 2025-05-06]
Then you can query deadline with
${
query[[
from index.tag "task"
where deadline == "2025-05-06"
]]
}
you can, just follow the doc Library/Std/Page Templates. It is basically a normal page with specific tag and frontmatter. Below is my template for weekly note for your reference. Note you need to implement the specific helper function yourselfs.
That’s a great start thank you, I’ve created my own template query that gives link to page task name and deadline, and filters on deadline and done status which gives:
Is there a function I could replace where deadline <= "2025-05-05" with so it automatically gives today’s date? I’ve tried replacing “2025-05-05” with ${date.today()} but that doesn’t work within the Where clause.
Will have a bash at the page template next. Thanks again.
The date api documentation/implementation is here: Library/Std/Date. It is actually based on the os api you can find here: API . Note that the API page is not totally up-to-date since it was a one-time generation from Zef using AI helper. But the api documented there should be working right now.
For your case, what you need in the Lua Integrated Query is like
${
query[[
from t = index.tag "task"
where t.deadline <= os.date('%Y-%m-%d')
]]
}
Or with date module
${
query[[
from t = index.tag "task"
where t.deadline <= date.today()
]]
}