bastibe / org-journal

A simple org-mode based journaling mode
BSD 3-Clause "New" or "Revised" License
1.24k stars 124 forks source link

Option to keep weekly or monthly diaries instead of just daily? #59

Closed BrianZbr closed 5 years ago

BrianZbr commented 8 years ago

I want my journal to be formatted something like this, with a single file for each week.

* Monday, 01/04/16
** 10:28 Company meeting
Endless discussions about projects. Not much progress
* Tuesday, 01/05/16
** 10:30 Another company meeting
Same as yesterday.

I have tried adding (setq org-journal-file-format "%Y%m%U"). This way, on the second day onwards until the next weeks starts, new entries go to the same file (20160101), which is almost what I want. But this does not automatically give me a new date heading. So unless I add it manually, I end up with this:

* Monday, 01/04/16
** 10:28 Company meeting
Endless discussions about projects. Not much progress
** 10:30 Another company meeting
Same as yesterday.

I guess this is a feature request, unless you can suggest other settings to try?

bastibe commented 8 years ago

Thank you, that's a very interesting proposition!

You could add the current day to your org-journal-time-format and org-journal-time-prefix. This would reproduce your first example, but would add the day to every time heading.

For a proper solution, I would need to add a setting for daily/weekly/monthly diaries. I guess that's doable, but it will take a while. If you want to try implementing it, I would be happy to merge that as well.

BrianZbr commented 8 years ago

My elisp skills are very minimal so I doubt I'll manage to implement this myself. I've got the day added to org-journal-time-prefix for now. I'm keeping this open with an updated title, as a feature request for the future... thanks!

d12frosted commented 8 years ago

For a proper solution, I would need to add a setting for daily/weekly/monthly diaries. I guess that's doable, but it will take a while.

I think it would be nicer to just add support of using one file for more than one day. So that lets user to configure daily/weekly/monthly or any other behaviour on file name level. org-journal should properly insert date if it's missing and show journaled days in calendar. Oh and probably search should be checked for proper behaviour (never actually used this functionality from org-journal).

bastibe commented 8 years ago

I have to be honest here: I have no idea what my time frame for this is going to be or if I will ever come around to doing this. I'll try, but I can't promise anything.

If anyone else wants to take a stab at this, I'd be very grateful.

d12frosted commented 8 years ago

@bastibe don't worry 😸

Not going to promise, but I might look at this in near future.

vkazanov commented 7 years ago

@d12frosted

Do you still feel like working on this issue?

d12frosted commented 7 years ago

@vkazanov oh sorry, I totally forgot about this one 🐱 I wanted something quick, so I am using org-capture for now.

ghost commented 6 years ago

Maybe a better Idea would be to aggregate all of a (time) daily's into a monthly or weekly file. this would help with agenda loading hundreds of files looking for todo/ and todone

bastibe commented 6 years ago

This would break the calendar integration, in that journal entries would no longer show for each individual day, but only once per week or month.

casch-at commented 5 years ago

This issue sounds very similuar to what I have created a todo for.

* TODO: org-journal: combine journals to week/month/year for faster encryption/decryption/searching
** NEXT: Study the code and make notes about a possible implementation 

This would break the calendar integration, in that journal entries would no longer show for each individual day, but only once per week or month.

If the week/month/year file contains a well defined header for each day entry it would be possible to create calendar entries, wouldn't it?

Requirements:

What else?

bastibe commented 5 years ago

If the week/month/year file contains a well defined header for each day entry it would be possible to create calendar entries, wouldn't it?

The "header" is defined by org-journal-date-format and org-journal-date-prefix. You would have to grep for a regex created from the format. And you would need to do so in fundamental mode. Org-mode can not be loaded for bulk operations as it is way too slow to load.

code to transform journals to daily/weekly/monthly/yearly

Honestly, I would leave that up to the user.

casch-at commented 5 years ago

Honestly, I would leave that up to the user.

Perfect :-D

What about the file format of the daily/weekly/monthly/yearly file. Create just a top most header with the weekly/monthly/yearly date, and create another header below it with the usual daily header?

Or should we also create a month, and week header for the year file, and a week header for the month file, respectively?

bastibe commented 5 years ago

I agree with your first proposal: Create one main headline per file, and only daily headlines beyond that (which should probably re-use the existing daily formatting rules, but a different prefix).

Maybe we could actually use the file format, and check if it contains the %Y, %m, and %d markers, to decide whether it will create daily, monthly, or annual files. We should then add new monthly and annual format strings.