insanum / gcalcli

Google Calendar Command Line Interface
MIT License
3.31k stars 311 forks source link

How do I change the length of time in 'agenda?' #596

Open jason-mehmel opened 3 years ago

jason-mehmel commented 3 years ago

Loving this program! I've got it set up to show my agenda in a Conky on my desktop, and it's great!

One thing I could use is the ability to see more than 5 days ahead. Looking at the man page, I see you can set dates for the agenda, but not (as far as I can see) the length of time. Is there a command I'm missing?

(I'd love to have a full 7 days ahead at any time.)

tyleraclark commented 3 years ago

Yes, add [start] [stop] arguments to the agenda command using one of the accepted structures for a date.

e.g. gcalcli agenda 'May 5 2021 12:00am' 'May 13 2021 12:00am' would give you eight days.

This page describes how to use the [start] [stop] arguments to get 7 days https://manpages.ubuntu.com/manpages/xenial/man1/gcalcli.1.html

jason-mehmel commented 3 years ago

Is there a non-date-specific way to do it?

For example --eightdayagenda instead of specific dates?

Because I've got this running in my conky, I would love for it to ALWAYS be looking a certain amount of days ahead, not just 5. And I can imagine a use-case where you'd want less, too! Like just one day, for 'today's agenda.'

tyleraclark commented 3 years ago

I don't believe so. I am trying to "hack" a similar solution where I only want to see events in the next hour. I am not familiar with conky, but here is CLI invocation I am working with:

gcalcli agenda "$(date '+%b %d %Y %H:%m')" "$(date -d "$date +1 hour" '+%b %d %Y %H:%m')"

which makes [start] the current time and [end] exactly one hour from now. i am sure you could deploy similar Tactics to get 8 days

dstengle commented 9 months ago

There is already a function that takes an agenda_length argument of 5, could we just expose this through the cli arguments?