wikitree / wikitree-dynamic-tree

Dynamically generated and browsed graphical family tree
MIT License
24 stars 19 forks source link

Family Anniversaries: Allow anniversaries to be exported into a calender feed (.ics) #120

Open jmegenealogy opened 1 year ago

jmegenealogy commented 1 year ago

This was a request for Special:Anniversaries, but it could be done here.

See the G2G post: https://www.wikitree.com/g2g/1197035/anniversaries-as-an-calendar-feed

GeoffRiley commented 1 year ago

It certainly sounds like a doable element, but it isn't really a visible report. There are systems that feed to Google / Outlook / generic .ical so it might consist of a page to make appropriate selections and a target calendar provider.

Ref: https://en.wikipedia.org/wiki/ICalendar

MichalVasut commented 1 year ago

It certainly sounds like a doable element, but it isn't really a visible report....

There already is Family Aniversaries view

https://www.wikitree.com/apps/#view=calendar

And would imho use very similar dataloading - only difference would be

So what I would suggest is to generalize this view and based on input (what to do) construct screen or file version...

bcaseyrls commented 1 year ago

I have an alpha version of an "calendar" link on the Family Anniversaries view (after the list of months). When clicked it generates the calendar data file for download, which can then be imported into a calendar program like iCal. It works, but it won't be a simple URL that you can "subscribe" to since it requires loading the anniversary view and then clicking the action link. Since the data doesn't change like regular appointments, maybe that will be adequate. I'll try to push this into a branch for others to take a look.

GeoffRiley commented 1 year ago

Looking at the view, it could easily afford an options icon in the upper right in a similar manner to other views, then place the extra bits, such as export, in there… it could follow for other views to perform exports of generated data in that manner too.

MichalVasut commented 1 year ago

@bcaseyrls

it won't be a simple URL that you can "subscribe"

There is another issue with the feed - I'm not familiar what HTTP methods calendar apps supports to subscribe to the feed, but only imho GET - on the other hand, in order to obtain Aniversaries at WikiTree, you need to authenticate yourself and you really don't want to send your password in url...

bcaseyrls commented 1 year ago

Definitely the need to be signed into the API (and to WikiTree in general for the main Tree Apps installation) is another hurdle to making this calendar something that can be subscribed to.

I think there's still value in producing the download, given that most of the anniversaries won't change frequently. I've created this function under an "ics" link in the Family Anniversaries view. I pushed this into the repo under the "ics" branch (https://github.com/wikitree/wikitree-dynamic-tree/tree/ics). Perhaps someone else can take a look and move the function into a generalized tool icon/pop-up, or make the calendar descriptions more complete, or whatever else seems like it would be good before this goes into the main branch version of the calendar view.