Skip to content

Instantly share code, notes, and snippets.

@swallentin
Created December 21, 2022 16:27
Show Gist options
  • Save swallentin/9979cd8e3425524d9c126759aecb86c3 to your computer and use it in GitHub Desktop.
Save swallentin/9979cd8e3425524d9c126759aecb86c3 to your computer and use it in GitHub Desktop.
const { google } = require("calendar-link");
const dates = {
"2023-01-02": ["12:30", "13:15", "14:00", "14:45", "15:30"],
"2023-01-03": ["09:30", "10:00"],
"2023-01-04": ["09:30", "10:15", "11:00"],
"2023-01-05": [
"09:30",
"10:15",
"11:00",
"12:00",
"12:45",
"13:30",
"14:15",
"15:00",
],
"2023-01-06": [
"09:30",
"10:15",
"11:00",
"12:00",
"12:45",
"13:30",
"14:15",
"15:00",
],
};
Object.entries(dates)
.map(([date, values]) => values.map((value) => `${date} ${value}:00 +0100`))
.flat()
.forEach((start) => {
console.log(
google({
title: "1on1",
description: `Questions to think about before 1-1\n
What am I proud of last month? What has been meaningful and stimulating? \n
How does it go with the goals? \n
If you don't have any set goals, how are your work tasks going?\n
Any issues/Challenges? \n
Action/ action ahead?\n`,
start,
duration: [0.5, "hour"],
guests: ["[email protected]"],
rRule: `RRULE:INTERVAL=2;FREQ=WEEKLY`,
})
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment