Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat!(journal): periodic & multiple journals#1474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
benlubas wants to merge3 commits intonvim-neorg:main
base:main
Choose a base branch
Loading
frombenlubas:feat/periodic_journals

Conversation

@benlubas
Copy link
Contributor

@benlubasbenlubas commentedJun 22, 2024
edited
Loading

implements#1471

Features

  • Support for multiple journals, and periodic journals
    • Each journal gets a name, start date, time period, and file format string/stategy
    • you can specify period as either days or months + years.
  • Ships with a daily, weekly, and monthly journal by default
  • users can create their own journals
  • all the journal commands now optionally take a journal name. When the name is left out, uses the default journal (configurable, defaults to daily).
  • new commands,:Neorg journal previous|current|next <journal_name>
  • each journal gets it's own template

Of Note

  • looking for feedback on:
    • functionality--does this cover all the cases we want? Does this ship the defaults that we want?
    • user experience/configuration--anything else that should be configurable? Should each journal be able to have its own folder? or should they continue to be in the same overarching folder, with configurable subfolders/the option to not be in a subfolder?
  • TOC code is untouched and untested, I think forcing each journal into its own subfolder would make the TOC implementation easier, other suggestions on how to handle it would be welcome
  • The breaking change is pretty minimal right now. Templates are now configured differently, and templates files will have a new name. Instead of configuring withtemplate_name = template.norg it's nowbase_template_name = "template" and templates files will be created on a per-journal basis like:template-daily.norg

szaffarano and redongh reacted with thumbs up emoji
@benlubas
Copy link
ContributorAuthor

@maxkuzn if you have feedback on the features here that would be great

@vhyrro
Copy link
Member

With core.tempus now being the defacto (since 0.10 is required) I can start reviewing this sooner than later. I took a general glance at it and the execution looks solid.

@benlubas
Copy link
ContributorAuthor

Had a look at this again. I think the best solution for thejournal toc commands will be to make them pattern match for file names so that you get a toc specific to each journal.

I'm fairly sure it's possible to transform thepath_format_strategy into a lua pattern iff thepath_format_strategy is a string. When that value is a function (which is allowed) we would have to also ask the user to provide some type of filter function that takes a path and tells us if it's a part of the journal.

I think this is a fairly reasonable approach. Let me know if you have thoughts@vhyrro

@benlubasbenlubasforce-pushed thefeat/periodic_journals branch from5a13046 tof5607beCompareJuly 23, 2024 20:26
@benlubasbenlubasforce-pushed thefeat/periodic_journals branch fromf5607be tofdafabeCompareJuly 23, 2024 20:56
@redongh
Copy link

redongh commentedFeb 11, 2025
edited
Loading

just stumbled upon this after posting#1648 but seems like the general idea/concept behind this was at least similar.

as this feature here goes well beyond my quick-fix/workaround, i definitely think this would add great value to the journal module and would therefore love to see this becoming fully available.

one thing that i'm wondering about is how aunified TOC may look like for this.
some may want/prefer completely separate TOC's for each journal but at least for my intended use-case, a fused general journal-TOC would also be desireable. the big question is how this should look like, especially when a smaller timespan won't completely fit into a larger one (think of a weekly and a monthly journal where the week overlaps into another month) rendering nesting somewhat unsuitable.
it would however IMHO still make sense to aim for a fused/unified TOC but the only option i see right now would be an adequately named link (e.g.week07.start,week07.end,q1.start /q1.end , ...) at the start and at the end of a period and drop those next to the respective day.

another idea/questionmark that was popping up reading through the description was how about a possibility to expresslink-templates within journal templates which effectively would generate links into another journal's entries (e.g. dynamically generating and embedding a link into a newly created daily journal's entry to the surrounding weekly and/or monthly and/or quarterly journal given that such exists)?
the downside of this could be that for such a thing to work, the outermost journal (e.q. quarterly) hierarchy of a new period may have to be created first followed by the inner ones in the right order.
while i could imagine to easily manually edit a quarter's template, doing the same for e.g. a weekly or bi-weekly journal seems a bit tedious.

@benlubas
Copy link
ContributorAuthor

Glad you like it!

Unified toc

Yeah that would be useful. We could add a new function for it. Formatting it would be a challenge, months throw things off for sure.

We could easily do years + months + days or years + weeks (mostly work) + days.

Including months, if we want to be strict about days being correct, we could include a week that spans two separate months in both of those months, and list only the days of that week which are in the current month.

Something else to think about:

  • someone could make their own journal that reoccurs every 48 days, how do you nest that? Do we start repeating months now?

  • If someone makes a journal that repeats every 30 days, which one nests inside the other? Months or 30 days?

I think the answer to this question is to make the toc generation modular enough that users can decide how their custom journals fit in, and then default only include daily, monthly, yearly in the unified view.

Dynamic templates

There's a third party module, pysan3/neorg-templates, that allows for dynamic templates using luasnip. Highly recommend.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vhyrrovhyrroAwaiting requested review from vhyrrovhyrro will be requested when the pull request is marked ready for reviewvhyrro is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@benlubas@vhyrro@redongh

[8]ページ先頭

©2009-2025 Movatter.jp