Weekly planning in SiYuan

This post was last updated for 331 days ago, and the information may already be changed

I set up my weekly planning workflow in SiYuan and thought I might share in case it is useful for others

Setup for the plan

First I set up a horizontal Super block with the week days and additional vertical superblocks on each day that contains the list of tasks/appointments (mostly links to existing things)

image.png

Query the current day

When I look at my plan during a workday I just want to see the current day. I could not get strftime to work to get the day of the week but the following query works. The ids are the ids of the weekday headings created in the previous step. Since the first of January of 2024 was a monday we can calculate the remainder of the difference to the current day divided by 7 to get the weekday in numeric form (starting at 0). Note that any other past monday would also work. On saturdays and sundays it selects the "This Week" heading to show the entire week.

WITH d AS (
SELECT (julianday('now') - julianday('2024-01-01')) % 7 AS wday
)
SELECT * 
FROM blocks 
WHERE id = CASE
  WHEN (select wday from d) = 0 THEN '20240107122404-u8tdpt6' -- Monday
  WHEN (select wday from d) = 1 THEN '20240107122406-cz6a3hd' -- Tuesday
  WHEN (select wday from d) = 2 THEN '20240102190549-g9itk7q' -- Wednesday
  WHEN (select wday from d) = 3 THEN '20240102190247-h4e9cvv' -- Thursday
  WHEN (select wday from d) = 4 THEN '20240102190224-ey38w2x' -- Friday
  ELSE '20240101005231-68jp7kf' -- Show all
END

Result for Monday:

image.png

Hope that this is useful to someone. :)

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...
    • justcosmic1

      Hi

      Thanks for sharing this.

      When you say you first created horizontal "superblock" and then several vertical ones, can you explain how you achieved that?

      I have been trying to create columns that I can then put embeds in, so that I can have queries showing my tasks in different columns; similar to kanban style.

      But trying to achieve that in the GUI seems to always fail. It would be great if it could work that way.

      I have the Monaco integrated edit environment plugin - but it seems that it doesn't actually allow you to edit! only to view in markdown etcetera.

      So next I will try editing in Markdown offline and then importing templates etcetera...sadly I am quite new to markdown as well as SQL - so it will probably be a slow process.

    • MiscReply
    • justcosmic1

      Well I finally managed to create some columns (not in super block) by dragging stuff around in the GUI. It did crash SiYuan a couple of times before I could get it to do what I wanted.

      So it looks as though this functionality just needs some bug fixing.

      It's currently quite hard to get things to snap to the position you want them in.

      But the fact it can even do this at all is still a vast improvement over Logseq or Obsidian IMO.

      I am finding more and more that there is usually a way to get it to do the things I want, without requiring a million plugins or a degree in markdown!

      Thank you SiYuan developers - keep up the good work :)