obsidian-periodic-notes icon indicating copy to clipboard operation
obsidian-periodic-notes copied to clipboard

Open previous/next weekly note does not work

Open petrkahanek opened this issue 1 year ago • 9 comments

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...

petrkahanek avatar Jul 31 '23 18:07 petrkahanek

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.

mossadacity avatar Aug 10 '23 05:08 mossadacity

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.

mathisgauthey avatar Aug 14 '23 07:08 mathisgauthey

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.

booxter avatar Aug 27 '23 20:08 booxter

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.

mathisgauthey avatar Aug 27 '23 22:08 mathisgauthey

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.

aidan-gibson avatar Aug 31 '23 21:08 aidan-gibson

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 ✌️

mathisgauthey avatar Sep 01 '23 08:09 mathisgauthey

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.

hmuchalski avatar Dec 18 '23 20:12 hmuchalski

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;
%>

mathisgauthey avatar Dec 19 '23 10:12 mathisgauthey

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

burgerga avatar Jun 17 '24 10:06 burgerga