notesmd-cli icon indicating copy to clipboard operation
notesmd-cli copied to clipboard

Support for generating day notes (Obsidian Calendar, and Template / Templater plugins)

Open tedmiston opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe.

I was very excited to find this CLI as I have been looking for something like this for a while. My desired use case is to use the CLI to create / open day notes, e.g., <vault root>/days/2023-06-21.md. Day notes are rendered from a day template for each calendar day, e.g., /templates/day.md.

Expected: I was hoping when I asked the CLI to create a note for YYYY-MM-DD that it would automatically pick up on the day note naming format and know that it should create a day note from the template and in the configure day notes folder.

Actual: What the CLI does today, instead, when running obs create 2023-06-21 is: create an empty note at the root named e.g., 2023-06-21.md.

Describe the solution you'd like

I would like obs to automatically generate the daily note file when passed the appropriate args. Maybe that is: obs create 2023-06-21 or obs create --day 2023-06-21 etc.

The Obsidian Calendar plugin provides a convenient way to generate and navigate daily notes. It is one of the most popular community plugins, and many Obsidian users use this every day.

The Calendar plugin can be used with either the built-in Templates core plugin or a more advanced external one such as Templater (another of the most popular plugins). [The Templater plugin is configured to trigger on new file creation, so there should not need to be anything specific done for that vs the default Templates plugin... it should "just work".]

Describe alternatives you've considered

Open Obsidian and create the new day note in the GUI.

Additional context

tedmiston avatar Jun 21 '23 16:06 tedmiston

Thank you for the feedback! I personally don't make use of the calendar plugin or daily notes in a traditional way but this seems like a great idea. I will add this as a feature request but unfortunately I won't be able to start on this in the foreseeable future. If you (or anyone else) know Go, please feel free to contribute.

Yakitrak avatar Jun 30 '23 21:06 Yakitrak

As a workaround I do obs create "dailynotes/2024-03-25" --content "" --append --open, that should work.

I have a small shell script that will create/open the day note based on an "x days ago" argument, eg: jl -1 to open the day note of yesterday, etc. jl to open today (jl is short for journal) Thanks for the neat project btw Yakitrak :)

dieterwalckiers avatar Mar 25 '24 14:03 dieterwalckiers

As Obsidian URI now provide support for daily notes (with templates), the latest release now has added this as a new command: https://github.com/Yakitrak/obsidian-cli/releases/tag/v0.1.8

Thanks for raising this!

Yakitrak avatar Dec 27 '24 20:12 Yakitrak