orgzly-revived / orgzly-android-revived

Outliner for taking notes and managing to-do lists
https://www.orgzlyrevived.com
GNU General Public License v3.0
606 stars 38 forks source link

Calendar Provider #39

Open alensiljak opened 11 months ago

alensiljak commented 11 months ago

This is a long-term dream of having the task dates displayed in a Calendar. Orgzly should register itself as a calendar provider, allowing regular calendar apps to display the timed events visually on a time calendar.

The first calendar to offer would be Agenda. Agenda is a pre-defined query, whose results could be offered through the Agenda "calendar". Agenda is limited to the upcoming 2 weeks and that might be enough for now, to see the most-immediate upcoming tasks.

Other calendars can be worked-out later. Generally, any saved query could be offered as a calendar, too.

Not all tasks have dates set so this needs to be fleshed-out, if required at all.

Any calendar app on the device can choose to display this calendar along with others, "real" calendars, or just in a week, day, or month view.

This is the ultimate goal and overshadows #38, which is just a step in that direction. A lot of work overlaps, anyway, so #38 might also be possible as a side-effect, if this is implemented.

Related:

Ypot commented 11 months ago

Orgzly has an agenda that I think is not limited to 2 weeks. https://www.orgzly.com/docs#search-agenda

Try it using this search: (b.your-notebook-name) o.e o.s ad.35

That would be the agenda for 35 days

For me too, a calendar is a very needed feature. Many users are not able to set a calendar on Android for their org agenda.

I suppose the calendar ics file should be generated automatically, maybe like the widget. And probably orgzly should create an ID for each entry, if it doesn't exist.

alensiljak commented 11 months ago

I did not mean for Orgzly to implement the calendar widget but just to offer saved searches through a Calendar Provider. The display, reminders, and all the other calendar features have been implemented many times over by numerous calendar apps, which I'm sure we all already have. By implementing the Calendar Provider, any calendar would be able to display it or act upon it, show widgets or anything else the calendars do. There's too many good calendar apps out there. No need to waste effort reinventing the wheel.

stefan2904 commented 9 months ago

I just learned about the ICSx⁵ Android app:

ICSx⁵ is an Android app to subscribe to [...] local iCalendar files [...]. It will

[...] import it into a native read-only calendar, which then can be used with your favorite calendar app.

The "create a native read-only calendar" part sounds similar to what we want to do in this issue. Only that the source would be an org agenda and not a ical file.

Since it is open source, we could look at how they do that, and maybe re-use some of their leanings or code.

alensiljak commented 9 months ago

Right. I mentioned ICSx5 a couple of times in https://github.com/orgzly/orgzly-android/issues/57. I've been using it for years for DAV sync in general (contacts and calendars).

https://github.com/larkery/orgcal is also worth looking into. It might be simpler.

But both projects act as providers, so the code is "out there".

Edit: in particular https://github.com/larkery/orgcal/tree/master/app/src/main/java/com/larkery/simpleorgsync/cal

stfl commented 7 months ago

+1

hrdl-github commented 6 months ago

ox-icalendar.el (https://github.com/emacs-mirror/emacs/blob/master/lisp/org/ox-icalendar.el) is a good reference. I just saw that it also supports VTODO entries, which would allow integration into apps like https://github.com/TechbeeAT/jtxBoard. VJOURNAL is not supported.