Ensure Daily Journal
This skill ensures that the Logseq journal file for a specific date exists.
Inputs
- •
date: (Optional) The date string inYYYY_MM_DDformat. Defaults to the current local date.
Steps
- •
Determine Target Date
- •usage:
dateargument or current date. - •format:
YYYY_MM_DD(e.g.,2026_02_09).
- •usage:
- •
Check File Existence
- •Check if
journals/{date}.mdexists. - •IF EXISTS: Return success (Content already exists).
- •Check if
- •
Read Template (If File Missing)
- •Read
pages/templates.md. - •Parse the markdown to find the block named
Daily frameworkwith propertytemplate:: Daily framework. - •Extract the children blocks of this template.
- •Logic: Since
template-including-parent:: falseis used, extract only the nested list items, removing one level of indentation.
- •Read
- •
Create Journal File
- •Write the extracted content to
journals/{date}.md. - •Ensure the content is formatted as valid Logseq markdown (list items).
- •Write the extracted content to
Example Action
ensure_daily_journal(date="2026_02_09") -> ensures journals/2026_02_09.md exists.