cloud-atlas-ai / obsidian-ics

Generate Daily Planner from ical feeds
MIT License
139 stars 27 forks source link

(FR?) Weekly Note Usage #76

Closed brimwats closed 11 months ago

brimwats commented 11 months ago

I did a search of issues and saw #16 , I use weekly notes. happy to specify that in this plugin or in periodic notes. Currently I have weekly notes specified in periodic notes and daily notes disabled.

It would be great if there was a way to use them. the thoughts I had were

  1. a command to print all weekly events or
  2. the same but following a template or
  3. a way to specify where in a weekly note template the ics events should print or
  4. a way to print events in the previous/next/current day the current day (probably the simplest?)
muness commented 11 months ago

Technically, I can add a getEvents that takes a range of dates, that's relatively straightforward since it can just loop through the days. What I'm struggling to think through is how this would be used. Wouldn't you still want one day at a time?

Can you elaborate, @brimwats ?

brimwats commented 11 months ago

Technically, I can add a getEvents that takes a range of dates, that's relatively straightforward since it can just loop through the days. What I'm struggling to think through is how this would be used. Wouldn't you still want one day at a time?

Can you elaborate, @brimwats ?

Sure, i'd be using it in a note like this:

image

or perhaps in the weekly table overview like this:

image

brimwats commented 11 months ago

It would be great to just put the events in and then make notes under them rather than alt+tab read gcal for that date alt+tab write in obsidian . What was the third event again? oh alt+tab then alt+tab again

To answer the second question, it would be great if I could do it in my weekly note template, like :

## Summaries
### <% tp.date.now("dddd (MM/DD)", 2) %>

- {{SOME OBSIDIAN ICS DAY THING HERE}}

^<% tp.date.now("GGGG-MM-DD", 2) %>-journal-link

but I recognize that may be aspirational, so i was thinking maybe I could either paste the events in each day, or I could go under each day header each week and selet a date and have them pasted in.

muness commented 11 months ago

Thanks for clarifying. Looks like you already use Templater (or some other template plugin) to create the weekly note?

If so, you can use the Template example in the README to get events for each day.

brimwats commented 11 months ago

Thanks for that! It helps! The template looks like it pulls for one day; Is there any way to increment what date the templater is pulling from? I create the weekly notes on saturday or sunday so each thing is incremented by 2,3,4,5,6,7 (etc) days

muness commented 11 months ago

@brimwats , This is what I use in my Weekly Notes Template:


# {{title}}

 📆 [[<% moment(tp.file.title).subtract(7, 'days').format('YYYY-[W]ww') %>]] - [[<% moment(tp.file.title).add(7, 'days').format('YYYY-[W]ww') %>]] | [[{{date:YYYY-MM}}]]  | [[{{date:YYYY-[Q]Q}}]]

## Priority

- TBD

## Week at a Glance

- [[{{sunday:gggg-MM-DD}}]]
- [[{{monday:gggg-MM-DD}}]]
- [[{{tuesday:gggg-MM-DD}}]]
- [[{{wednesday:gggg-MM-DD}}]]
- [[{{thursday:gggg-MM-DD}}]]
- [[{{friday:gggg-MM-DD}}]]
- [[{{saturday:gggg-MM-DD}}]]

I think you can do the same kind of think with either the specific days of week as in the bullet lists or if you want to specify each day:

[[<% ...getEvents(moment(tp.file.title).add(1, 'days').format('ggg-MM-DD')...) %> [[<% ...getEvents(moment(tp.file.title).add(2, 'days').format('ggg-MM-DD')...) %>

etc...

muness commented 11 months ago

Closing for now, please reopen with more details (like the weekly note template you use) if the above doesn't work. Thanks!