Open pourmand1376 opened 1 year ago
I think the problem is that the date
is mutated here: https://github.com/liamcain/obsidian-periodic-notes/blob/main/src/main.ts#L218
I tried to fix this, but I can't get my fork to be loaded via BRAT.
A simple solution could be to replace this line with:
const filename = date.clone().format(format);
@liamcain could you please check if this is a viable solution. Happy to send a PR or for you to add it. Would be great as this should solve a lot of issues.
When I use {{date}}
in my weekly template I get 2023-W11
which is exactly the format I have for the weekly note.
I think the problem is that the
date
is mutated here: https://github.com/liamcain/obsidian-periodic-notes/blob/main/src/main.ts#L218I tried to fix this, but I can't get my fork to be loaded via BRAT.
A simple solution could be to replace this line with:
const filename = date.clone().format(format);
@liamcain could you please check if this is a viable solution. Happy to send a PR or for you to add it. Would be great as this should solve a lot of issues.
When I use
{{date}}
in my weekly template I get2023-W11
which is exactly the format I have for the weekly note.
you need to create a new release on your forked repository which points to the one commit you added in order for BRAT to pick it up. the release assets should also contain the main.js, manifest.json and styles.css (if applicable)
Yeah, I did try but it did not work. Feel free to copy the change over and create a release. It would be great to be able to use it.
The release script had to many issues on my setup to get it to run. No idea why.
@lukasoppermann i pulled your PR into my fork, and built and released it manually. i also added a couple changes of my own that add time calculations to the weekly note template parser.
https://github.com/GamerGirlandCo/obsidian-periodic-notes/releases/tag/1.0.0-beta.4
@lukasoppermann @GamerGirlandCo will either of you open a PR with those changes to get them upstreamed here? Would be nice to have this be fixed for the wider community, and installable from the plugin manager without manual intervention.
Also I discovered this issue seems to also affect the monthly, quarterly, and yearly notes as well 😔
Hey @cewood I actually found out that this did not completely solve the issue.
Hi, Thanks for creating this awesome obsidian plugin. I've been using your plugin for some time now. It is odd to me that the template for daily notes and monthly notes and yearly notes are working properly but the weekly notes template is not.
For example, I use this template at the top of my daily notes files and It actually replaces it with corresponding dates.
But when I use this one for weekly notes, it doesn't replace any of those values:
and If I click the generated file, it says: "Filename can not contain any of the following characters". It is because it hasn't still replaced those values with an actual date.
What should I do?
More Information: I also use this code to see my week at a glance and it is working very well.
It seems that
date
andtime
variables are not injected into weekly notes properly.