Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar #43

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Calendar #43

wants to merge 7 commits into from

Conversation

c-harding
Copy link
Owner

Add endpoint for serving an ical calendar containing all activities

const router = express.Router();

const mkRequestLogin = (res: express.Response) => async () => {
res.status(403).send('Not logged in');
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Handle logging in


res.type('text/calendar; charset=UTF-8');

const cal = ical({ name: 'Strava activities' });
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add proper caching of ical (only fetch new activities, e.g. from past week)
  • Clear old caches after certain time
  • Handle logout through GUI
  • Add link to GUI


for await (const activity of eagerIterator(strava.getStravaActivities())) {
const startTime = moment(activity.start_date).tz(activity.timezone.split(' ')[1]);
const location = activity.start_latlng.join(', ');
Copy link
Owner Author

@c-harding c-harding May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Consider geocoding here

@c-harding c-harding force-pushed the calendar branch 2 times, most recently from 094f89f to d9215dd Compare January 11, 2023 20:15
@c-harding c-harding force-pushed the calendar branch 5 times, most recently from 56c2872 to dbc9936 Compare February 22, 2023 22:55
@unitbob1
Copy link

A UI could be provided with two buttons to launch a calendar app, or to copy the ICAL link allowing the user choice over which they use. This allows google calendar users to add it both on mobile and windows very easily

@c-harding c-harding force-pushed the calendar branch 6 times, most recently from 32b43f8 to fc010a8 Compare March 19, 2024 01:45
@c-harding c-harding force-pushed the calendar branch 4 times, most recently from ae5802a to fbf0534 Compare April 1, 2024 09:37
@c-harding c-harding force-pushed the calendar branch 4 times, most recently from 1cc17e2 to 52818d2 Compare November 24, 2024 22:29
@c-harding c-harding force-pushed the calendar branch 2 times, most recently from 30d6682 to 6a9ce7f Compare January 3, 2025 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants