KevinBatdorf / obsidian-raycast

Raycast extension with commands for the note taking app Obsidian.
MIT License
106 stars 19 forks source link

[Templates] Add ISO8601 {week} number template #62

Closed AdamAdamsMusic closed 1 year ago

AdamAdamsMusic commented 1 year ago

I split my tasks into separate notes in a "{year}-W{week} Tasks" template, where the week is padded to 2 numbers by default (so e.g. 2023-W09 Tasks.md).

At first I thought about opening the new feature request, but I managed to do it on my own, and so I present this solution. Additionally, now notePath (for file to append tasks to) goes through applyTemplates(), so it can work in my use case.

There is a tiny bit of a existing code refactor – if this is unwanted, let me know!

KevinBatdorf commented 1 year ago

Hey @AdamAdamsMusic code looks great, thanks! I'll run it tomorrow or the next day just to confirm.

Add your Raycast name to the manifest in package.json too if you want.

KevinBatdorf commented 1 year ago

@AdamAdamsMusic Can you doublecheck your Raycast username? The build is failing:

https://github.com/raycast/extensions/pull/7435/files#annotation_12481953831

AdamAdamsMusic commented 1 year ago

Sorry for that! Turns out it's case-sensitive - should work now!