liamcain / obsidian-periodic-notes

Create/manage your daily, weekly, and monthly notes in Obsidian
MIT License
993 stars 68 forks source link

Open previous/next weekly note does not work #193

Open petrkahanek opened 1 year ago

petrkahanek commented 1 year ago

I feel like these two commands do not work for me. I am on the current weekly note, hit the "open next weekly note" and none is created for me. I thought I would use this plugin during my "sunday" weekly reviews, where I would create new weekly note. According my locale, I have Monday set as week's starting day.

Maybe I'm using the plugin incorrectly...

mossadacity commented 1 year ago

I believe this is the expected behavior, and previous/next note is not intended to create one if it does not exist? Certainly previous/next daily note does not create a new note - they skip through the existing notes.

Very glad it works the current way, or I would have to wade through a sea of freshly created blank daily/weekly notes; I do not make a note for every day.

mathisgauthey commented 1 year ago

I'm having the same issue. In this issue it is said to be a normal behavior.

It is stated in the readme that it Skips over weeks with no weekly note file.

However I remember seeing somewhere that it was developed to create a note if it doesn't exist. Edit : Nope, it stated the same.

TLDR : Not possible with the current version of the plugin and not planned to be so as far as I know.

booxter commented 1 year ago

I understand there may be a use case where days / weeks / months are skipped, but it would be nice to have it available for configuration, so that a user could create the next before the day / week starts. This is useful for those who have a weekly habit of planning the next week at the end of the previous week.

mathisgauthey commented 1 year ago

I can only agree with you. I don't know if there's a feature request yet, but I can't check right now, I don't even know if this message will be sent because of the low reception I have around here.

aidan-gibson commented 1 year ago

I would love this feature as well; my shitty workaround is using the Calendar plugin and clicking the next week to create the note if it isn't made yet. Even just adding a command from the calendar plugin would help my use case, as I'm just trying to have "Previous Week" and "Next Week" buttons in each of my Weekly Notes.

mathisgauthey commented 1 year ago

I would love this feature as well; my shitty workaround is using the Calendar plugin and clicking the next week to create the note if it isn't made yet. Even just adding a command from the calendar plugin would help my use case, as I'm just trying to have "Previous Week" and "Next Week" buttons in each of my Weekly Notes.

If you want, I created an obsidian workflow template, and there's buttons for periodic notes navigations using some templater script. It's just at the beginning of the periodic notes and you can just take that code if you feel like it ✌️

hmuchalski commented 11 months ago

The issue I have is that after having year of weekly notes, the app is confused about which year it is. For example, if the current week is 2023-W50 and I want to open the next week note (2023-W51) it opens W51 note from 2022, not from 2023. Moving the 2022-W51 into a separate folder doesn't change the behavior. Even if I manually create 2023-W51, when I try to open it as "next week note" it opens 2022-51.

mathisgauthey commented 11 months ago

The issue I have is that after having year of weekly notes, the app is confused about which year it is. For example, if the current week is 2023-W50 and I want to open the next week note (2023-W51) it opens W51 note from 2022, not from 2023. Moving the 2022-W51 into a separate folder doesn't change the behavior. Even if I manually create 2023-W51, when I try to open it as "next week note" it opens 2022-51.

Hey, I suggest that you take a look at this repo for a templater alternative with periodic notes navigations.

Here's my setup for a daily note :

image

<%*
const currentMoment = moment(tp.file.title, "YYYY-MM-DD");
const hash = '# ';
const slash = ' / ';
const pipe = ' | ';
const leftAngle = '❮ ';
const rightAngle = ' ❯';
tR += leftAngle;
tR += '[[' + currentMoment.format('YYYY') + ']]' + slash;
tR += '[[' + currentMoment.format('YYYY-[Q]Q|[Q]Q') + ']]' + slash;
tR += '[[' + currentMoment.format('YYYY-MM|MMMM') + ']]' + slash;
tR += '[[' + currentMoment.format('GGGG-[W]WW|[Week] WW') + ']]';
tR += rightAngle;
tR += '\n';
tR += '\n';
tR += leftAngle;
currentMoment.add(-1,'days');
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]' + pipe;
currentMoment.add(1,'days');
tR += currentMoment.format('dddd Do') + pipe;
currentMoment.add(1,'days');
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]';
currentMoment.add(-1,'days');
tR += rightAngle;
%>

And for a weekly note :

image

<%*
const currentMoment = moment(tp.file.title, "GGGG-[W]WW");
const hash = '# ';
const slash = ' / ';
const pipe = ' | ';
const leftAngle = '❮ ';
const rightAngle = ' ❯';
tR += leftAngle;
tR += '[[' + currentMoment.format('YYYY') + ']]' + slash;
tR += '[[' + currentMoment.format('YYYY-[Q]Q|[Q]Q') + ']]' + slash;
tR += '[[' + currentMoment.format('YYYY-MM|MMMM') + ']]' + slash;
tR += '[[' + currentMoment.format('GGGG-[W]WW') + '|' + currentMoment.format('[Week] WW') + ']]';
tR += rightAngle;
tR += '\n';
tR += '\n';
tR += leftAngle;
currentMoment.add(-1,'weeks');
tR += '[[' + currentMoment.format('GGGG-[W]WW|[Week] WW') + ']]' + pipe;
currentMoment.add(1,'weeks');
tR += currentMoment.format('[Week] WW') + pipe;
currentMoment.add(1,'weeks');
tR += '[[' + currentMoment.format('GGGG-[W]WW|[Week] WW') + ']]';
currentMoment.add(-1,'weeks');
tR += rightAngle;
tR += '\n';
tR += '\n';
tR += leftAngle;
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]' + pipe;
currentMoment.add(1,'days');
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]' + pipe;
currentMoment.add(1,'days');
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]' + pipe;
currentMoment.add(1,'days');
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]' + pipe;
currentMoment.add(1,'days');
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]' + pipe;
currentMoment.add(1,'days');
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]' + pipe;
currentMoment.add(1,'days');
tR += '[[' + currentMoment.format('YYYY-MM-DD|dddd Do') + ']]';
tR += rightAngle;
%>
burgerga commented 5 months ago

This works in the beta release (just created some future weekly notes), to use the beta release use BRAT