From 6c9fb1139f86e816aaddf27da2a942017befe7b8 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Thu, 7 Nov 2024 03:44:11 +0300 Subject: [PATCH] fix(tests): ensure calendar file path is correct - Updated file path in merge date-based calendar test to point to the 'calendar' directory within TEST_MERGED_CALENDARS_DIR. --- calendar.test.js | 49 +-- calendar/Date_Based_Calendar.ics | 336 ++++++++++++++++++++ calendar/Date_Based_Calendar.json | 16 + calendar/No_Prefix_Calendar.ics | 266 ++++++++++++++++ calendar/No_Prefix_Calendar.json | 11 + calendar/Override_Calendar.ics | 266 ++++++++++++++++ calendar/Override_Calendar.json | 11 + calendar/Time_Based_Calendar.ics | 46 +++ calendar/Time_Based_Calendar.json | 16 + calendar/test.ics | 30 ++ calendar/test.json | 11 + directory_tree.txt | 38 +++ server.js | 2 +- temp_test_calendar/Date_Based_Calendar.json | 16 + temp_test_calendar/No_Prefix_Calendar.ics | 260 --------------- temp_test_calendar/No_Prefix_Calendar.json | 11 + temp_test_calendar/Override_Calendar.json | 11 + temp_test_calendar/Time_Based_Calendar.json | 16 + 18 files changed, 1127 insertions(+), 285 deletions(-) create mode 100644 calendar/Date_Based_Calendar.ics create mode 100644 calendar/Date_Based_Calendar.json create mode 100644 calendar/No_Prefix_Calendar.ics create mode 100644 calendar/No_Prefix_Calendar.json create mode 100644 calendar/Override_Calendar.ics create mode 100644 calendar/Override_Calendar.json create mode 100644 calendar/Time_Based_Calendar.ics create mode 100644 calendar/Time_Based_Calendar.json create mode 100644 calendar/test.ics create mode 100644 calendar/test.json create mode 100644 directory_tree.txt create mode 100644 temp_test_calendar/Date_Based_Calendar.json create mode 100644 temp_test_calendar/No_Prefix_Calendar.json create mode 100644 temp_test_calendar/Override_Calendar.json create mode 100644 temp_test_calendar/Time_Based_Calendar.json diff --git a/calendar.test.js b/calendar.test.js index 9d3fb40..b1eff1e 100644 --- a/calendar.test.js +++ b/calendar.test.js @@ -5,8 +5,8 @@ import path from 'path'; import app from './server'; const TEST_MERGED_CALENDARS_DIR = path.join(__dirname, 'tests'); -const TEST_CALENDARS_DIR = 'test_calendars'; -const EXPECTED_OUTPUTS_DIR = 'expected_outputs'; +const TEST_CALENDARS_DIR = path.join(__dirname, 'tests', 'test_calendars'); +const EXPECTED_OUTPUTS_DIR = path.join(__dirname,'test', 'expected_outputs'); let server; describe('Calendar Merging API', () => { beforeAll(async () => { @@ -31,7 +31,7 @@ describe('Calendar Merging API', () => { }); const loadCalendarFile = (filename) => { - return path.join(__dirname, TEST_CALENDARS_DIR, filename); + return path.join(TEST_CALENDARS_DIR, filename); }; const loadExpectedOutput = (filename) => { @@ -57,16 +57,17 @@ describe('Calendar Merging API', () => { ], }); expect(response.status).toBe(200); - expect(response.body.url).toMatch(/calendar\/Date_Based_Calendar/); + expect(response.body.url).toMatch(new RegExp(`calendar/Date_Based_Calendar`)); // Check if the file was created in the test directory - const filePath = path.join(TEST_MERGED_CALENDARS_DIR, 'Date_Based_Calendar.ics'); + const filePath = path.join(TEST_MERGED_CALENDARS_DIR, 'calendar', 'Date_Based_Calendar.ics'); + console.log('Checking if file exists at:', filePath); expect(fs.existsSync(filePath)).toBe(true); - // Load expected output and compare - const expectedOutput = loadExpectedOutput('Date_Based_Calendar.ics'); - const actualOutput = fs.readFileSync(filePath, 'utf8'); - // expect(actualOutput).toBe(expectedOutput); + // // Load expected output and compare + // const expectedOutput = loadExpectedOutput('Date_Based_Calendar.ics'); + // const actualOutput = fs.readFileSync(filePath, 'utf8'); + // // expect(actualOutput).toBe(expectedOutput); }); test('Merge time-based calendar', async () => { @@ -92,13 +93,13 @@ describe('Calendar Merging API', () => { expect(response.body.url).toMatch(/calendar\/Time_Based_Calendar/); // Check if the file was created in the test directory - const filePath = path.join(TEST_MERGED_CALENDARS_DIR, 'Time_Based_Calendar.ics'); + const filePath = path.join(TEST_MERGED_CALENDARS_DIR, 'calendar','Time_Based_Calendar.ics'); expect(fs.existsSync(filePath)).toBe(true); - // Load expected output and compare - const expectedOutput = loadExpectedOutput('Time_Based_Calendar.ics'); - const actualOutput = fs.readFileSync (filePath, 'utf8'); - // expect(actualOutput).toBe(expectedOutput); + // // Load expected output and compare + // const expectedOutput = loadExpectedOutput('Time_Based_Calendar.ics'); + // const actualOutput = fs.readFileSync (filePath, 'utf8'); + // // expect(actualOutput).toBe(expectedOutput); }); test('Merge calendar without prefix', async () => { @@ -119,13 +120,13 @@ describe('Calendar Merging API', () => { expect(response.body.url).toMatch(/calendar\/No_Prefix_Calendar/); // Check if the file was created in the test directory - const filePath = path.join(TEST_MERGED_CALENDARS_DIR, 'No_Prefix_Calendar.ics'); + const filePath = path.join(TEST_MERGED_CALENDARS_DIR, 'calendar', 'No_Prefix_Calendar.ics'); expect(fs.existsSync(filePath)).toBe(true); - // Load expected output and compare - const expectedOutput = loadExpectedOutput('No_Prefix_Calendar.ics'); - const actualOutput = fs.readFileSync(filePath, 'utf8'); - // expect(actualOutput).toBe(expectedOutput); + // // Load expected output and compare + // const expectedOutput = loadExpectedOutput('No_Prefix_Calendar.ics'); + // const actualOutput = fs.readFileSync(filePath, 'utf8'); + // // expect(actualOutput).toBe(expectedOutput); }); test('Merge calendar with override', async () => { @@ -146,13 +147,13 @@ describe('Calendar Merging API', () => { expect(response.body.url).toMatch(/calendar\/Override_Calendar/); // Check if the file was created in the test directory - const filePath = path.join(TEST_MERGED_CALENDARS_DIR, 'Override_Calendar.ics'); + const filePath = path.join(TEST_MERGED_CALENDARS_DIR, 'calendar', 'Override_Calendar.ics'); expect(fs.existsSync(filePath)).toBe(true); - // Load expected output and compare - const expectedOutput = loadExpectedOutput('Override_Calendar.ics'); - const actualOutput = fs.readFileSync(filePath, 'utf8'); - // expect(actualOutput).toBe(expectedOutput); + // // Load expected output and compare + // const expectedOutput = loadExpectedOutput('Override_Calendar.ics'); + // const actualOutput = fs.readFileSync(filePath, 'utf8'); + // // expect(actualOutput).toBe(expectedOutput); }); }); diff --git a/calendar/Date_Based_Calendar.ics b/calendar/Date_Based_Calendar.ics new file mode 100644 index 0000000..8121e3d --- /dev/null +++ b/calendar/Date_Based_Calendar.ics @@ -0,0 +1,336 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//sebbo.net//ical-generator//EN +NAME:Date Based Calendar +X-WR-CALNAME:Date Based Calendar +BEGIN:VEVENT +UID:62yw@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20230219 +DTEND;VALUE=DATE:20230224 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Ferien_Bayern_2023 Winterferien 2023 Bayern +END:VEVENT +BEGIN:VEVENT +UID:2w28@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20230402 +DTEND;VALUE=DATE:20230415 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Ferien_Bayern_2023 Osterferien 2023 Bayern +END:VEVENT +BEGIN:VEVENT +UID:ljtg@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20230529 +DTEND;VALUE=DATE:20230609 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Ferien_Bayern_2023 Pfingstferien 2023 Bayern +END:VEVENT +BEGIN:VEVENT +UID:7d5m@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20230730 +DTEND;VALUE=DATE:20230911 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Ferien_Bayern_2023 Sommerferien 2023 Bayern +END:VEVENT +BEGIN:VEVENT +UID:2bya@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20231029 +DTEND;VALUE=DATE:20231103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Ferien_Bayern_2023 Herbstferien 2023 Bayern +END:VEVENT +BEGIN:VEVENT +UID:i3r6@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20231121 +DTEND;VALUE=DATE:20231122 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Ferien_Bayern_2023 Herbstferien 2023 Bayern +END:VEVENT +BEGIN:VEVENT +UID:042o@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20231222 +DTEND;VALUE=DATE:20240105 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Ferien_Bayern_2023 Weihnachtsferien 2023 Bayern +END:VEVENT +BEGIN:VEVENT +UID:vr5n@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20231231 +DTEND;VALUE=DATE:20231231 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays New Year's Day +END:VEVENT +BEGIN:VEVENT +UID:gk19@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240114 +DTEND;VALUE=DATE:20240114 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays M L King Day +END:VEVENT +BEGIN:VEVENT +UID:sqva@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240218 +DTEND;VALUE=DATE:20240218 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Presidents' Day +END:VEVENT +BEGIN:VEVENT +UID:1xf8@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240328 +DTEND;VALUE=DATE:20240328 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Good Friday +END:VEVENT +BEGIN:VEVENT +UID:5mmn@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240330 +DTEND;VALUE=DATE:20240330 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Easter Sunday +END:VEVENT +BEGIN:VEVENT +UID:rsdk@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240526 +DTEND;VALUE=DATE:20240526 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Memorial Day +END:VEVENT +BEGIN:VEVENT +UID:kat5@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240618 +DTEND;VALUE=DATE:20240618 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Juneteenth +END:VEVENT +BEGIN:VEVENT +UID:ppvd@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240703 +DTEND;VALUE=DATE:20240703 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Independence Day +END:VEVENT +BEGIN:VEVENT +UID:sjo7@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240901 +DTEND;VALUE=DATE:20240901 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Labor Day +END:VEVENT +BEGIN:VEVENT +UID:b3bo@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241013 +DTEND;VALUE=DATE:20241013 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Columbus Day +END:VEVENT +BEGIN:VEVENT +UID:haf8@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241110 +DTEND;VALUE=DATE:20241110 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Veterans Day +END:VEVENT +BEGIN:VEVENT +UID:33iv@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241127 +DTEND;VALUE=DATE:20241127 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Thanksgiving Day +END:VEVENT +BEGIN:VEVENT +UID:8ygs@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241224 +DTEND;VALUE=DATE:20241224 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Christmas +END:VEVENT +BEGIN:VEVENT +UID:upph@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241231 +DTEND;VALUE=DATE:20241231 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays New Year's Day +END:VEVENT +BEGIN:VEVENT +UID:t7p7@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250119 +DTEND;VALUE=DATE:20250119 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays M L King Day +END:VEVENT +BEGIN:VEVENT +UID:es1h@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250216 +DTEND;VALUE=DATE:20250216 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Presidents' Day +END:VEVENT +BEGIN:VEVENT +UID:c0ie@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250417 +DTEND;VALUE=DATE:20250417 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Good Friday +END:VEVENT +BEGIN:VEVENT +UID:s944@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250419 +DTEND;VALUE=DATE:20250419 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Easter Sunday +END:VEVENT +BEGIN:VEVENT +UID:r33k@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250525 +DTEND;VALUE=DATE:20250525 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Memorial Day +END:VEVENT +BEGIN:VEVENT +UID:q7bi@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250618 +DTEND;VALUE=DATE:20250618 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Juneteenth +END:VEVENT +BEGIN:VEVENT +UID:tzx2@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250703 +DTEND;VALUE=DATE:20250703 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Independence Day +END:VEVENT +BEGIN:VEVENT +UID:a75o@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250831 +DTEND;VALUE=DATE:20250831 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Labor Day +END:VEVENT +BEGIN:VEVENT +UID:3p4f@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20251012 +DTEND;VALUE=DATE:20251012 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Columbus Day +END:VEVENT +BEGIN:VEVENT +UID:1fsh@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20251110 +DTEND;VALUE=DATE:20251110 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Veterans Day +END:VEVENT +BEGIN:VEVENT +UID:m3ak@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20251126 +DTEND;VALUE=DATE:20251126 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Thanksgiving Day +END:VEVENT +BEGIN:VEVENT +UID:fjjf@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20251224 +DTEND;VALUE=DATE:20251224 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:US_holidays Christmas +END:VEVENT +END:VCALENDAR \ No newline at end of file diff --git a/calendar/Date_Based_Calendar.json b/calendar/Date_Based_Calendar.json new file mode 100644 index 0000000..74abda2 --- /dev/null +++ b/calendar/Date_Based_Calendar.json @@ -0,0 +1,16 @@ +{ + "id": "Date_Based_Calendar", + "linkGroupName": "Date Based Calendar", + "calendars": [ + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\tests\\test_calendars\\ferien_bayern_2023.ics", + "prefix": "Ferien_Bayern_2023", + "override": false + }, + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\tests\\test_calendars\\US_Holidays.ics", + "prefix": "US_holidays", + "override": false + } + ] +} \ No newline at end of file diff --git a/calendar/No_Prefix_Calendar.ics b/calendar/No_Prefix_Calendar.ics new file mode 100644 index 0000000..3c18217 --- /dev/null +++ b/calendar/No_Prefix_Calendar.ics @@ -0,0 +1,266 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//sebbo.net//ical-generator//EN +NAME:No Prefix Calendar +X-WR-CALNAME:No Prefix Calendar +BEGIN:VEVENT +UID:x9il@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20231231 +DTEND;VALUE=DATE:20231231 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day +END:VEVENT +BEGIN:VEVENT +UID:teh8@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240101 +DTEND;VALUE=DATE:20240101 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day Holiday +END:VEVENT +BEGIN:VEVENT +UID:ivxs@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240102 +DTEND;VALUE=DATE:20240102 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day Holiday +END:VEVENT +BEGIN:VEVENT +UID:wewc@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240103 +DTEND;VALUE=DATE:20240103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day Holiday +END:VEVENT +BEGIN:VEVENT +UID:wa7f@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240104 +DTEND;VALUE=DATE:20240104 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day Holiday +END:VEVENT +BEGIN:VEVENT +UID:zcyl@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240106 +DTEND;VALUE=DATE:20240106 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Orthodox Christmas +END:VEVENT +BEGIN:VEVENT +UID:khsh@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240107 +DTEND;VALUE=DATE:20240107 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Orthodox Christmas Holiday +END:VEVENT +BEGIN:VEVENT +UID:f4di@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240222 +DTEND;VALUE=DATE:20240222 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Defender of the Fatherland +END:VEVENT +BEGIN:VEVENT +UID:qj03@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240307 +DTEND;VALUE=DATE:20240307 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Intl. Women's Day +END:VEVENT +BEGIN:VEVENT +UID:7bvf@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240430 +DTEND;VALUE=DATE:20240430 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Spring and Labor Day +END:VEVENT +BEGIN:VEVENT +UID:l26b@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240508 +DTEND;VALUE=DATE:20240508 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Victory Day +END:VEVENT +BEGIN:VEVENT +UID:exnx@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240611 +DTEND;VALUE=DATE:20240611 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Russia Day +END:VEVENT +BEGIN:VEVENT +UID:fqo9@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241103 +DTEND;VALUE=DATE:20241103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Civil Unity Day +END:VEVENT +BEGIN:VEVENT +UID:vvrh@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241231 +DTEND;VALUE=DATE:20241231 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day +END:VEVENT +BEGIN:VEVENT +UID:glq6@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250101 +DTEND;VALUE=DATE:20250101 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day Holiday +END:VEVENT +BEGIN:VEVENT +UID:k4g5@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250102 +DTEND;VALUE=DATE:20250102 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day Holiday +END:VEVENT +BEGIN:VEVENT +UID:spcf@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250103 +DTEND;VALUE=DATE:20250103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day Holiday +END:VEVENT +BEGIN:VEVENT +UID:dop6@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250104 +DTEND;VALUE=DATE:20250104 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: New Year's Day Holiday +END:VEVENT +BEGIN:VEVENT +UID:083t@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250106 +DTEND;VALUE=DATE:20250106 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Orthodox Christmas +END:VEVENT +BEGIN:VEVENT +UID:n2o3@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250107 +DTEND;VALUE=DATE:20250107 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Orthodox Christmas Holiday +END:VEVENT +BEGIN:VEVENT +UID:kxe2@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250223 +DTEND;VALUE=DATE:20250223 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Defender of the Fatherland +END:VEVENT +BEGIN:VEVENT +UID:gd00@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250309 +DTEND;VALUE=DATE:20250309 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Intl. Women's Day +END:VEVENT +BEGIN:VEVENT +UID:efw8@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250430 +DTEND;VALUE=DATE:20250430 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Spring and Labor Day +END:VEVENT +BEGIN:VEVENT +UID:fqrx@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250508 +DTEND;VALUE=DATE:20250508 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Victory Day +END:VEVENT +BEGIN:VEVENT +UID:f3wq@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250611 +DTEND;VALUE=DATE:20250611 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Russia Day +END:VEVENT +BEGIN:VEVENT +UID:nw1a@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20251103 +DTEND;VALUE=DATE:20251103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY: Civil Unity Day +END:VEVENT +END:VCALENDAR \ No newline at end of file diff --git a/calendar/No_Prefix_Calendar.json b/calendar/No_Prefix_Calendar.json new file mode 100644 index 0000000..4a8d41b --- /dev/null +++ b/calendar/No_Prefix_Calendar.json @@ -0,0 +1,11 @@ +{ + "id": "No_Prefix_Calendar", + "linkGroupName": "No Prefix Calendar", + "calendars": [ + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\tests\\test_calendars\\San_Francisco_Public_Holidays.ics", + "prefix": "", + "override": false + } + ] +} \ No newline at end of file diff --git a/calendar/Override_Calendar.ics b/calendar/Override_Calendar.ics new file mode 100644 index 0000000..ac62e46 --- /dev/null +++ b/calendar/Override_Calendar.ics @@ -0,0 +1,266 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//sebbo.net//ical-generator//EN +NAME:Override Calendar +X-WR-CALNAME:Override Calendar +BEGIN:VEVENT +UID:esp0@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20231231 +DTEND;VALUE=DATE:20231231 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:wo7i@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240101 +DTEND;VALUE=DATE:20240101 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:d2d1@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240102 +DTEND;VALUE=DATE:20240102 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:9wmf@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240103 +DTEND;VALUE=DATE:20240103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:34va@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240104 +DTEND;VALUE=DATE:20240104 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:ujj9@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240106 +DTEND;VALUE=DATE:20240106 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:cwbo@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240107 +DTEND;VALUE=DATE:20240107 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:6fi6@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240222 +DTEND;VALUE=DATE:20240222 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:7iu4@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240307 +DTEND;VALUE=DATE:20240307 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:n6ic@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240430 +DTEND;VALUE=DATE:20240430 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:a97h@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240508 +DTEND;VALUE=DATE:20240508 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:17gv@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20240611 +DTEND;VALUE=DATE:20240611 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:uy33@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241103 +DTEND;VALUE=DATE:20241103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:ilt7@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20241231 +DTEND;VALUE=DATE:20241231 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:m38p@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250101 +DTEND;VALUE=DATE:20250101 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:kg4t@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250102 +DTEND;VALUE=DATE:20250102 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:t313@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250103 +DTEND;VALUE=DATE:20250103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:q0tz@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250104 +DTEND;VALUE=DATE:20250104 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:952w@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250106 +DTEND;VALUE=DATE:20250106 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:oa4m@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250107 +DTEND;VALUE=DATE:20250107 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:lf4s@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250223 +DTEND;VALUE=DATE:20250223 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:i9e9@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250309 +DTEND;VALUE=DATE:20250309 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:t8ex@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250430 +DTEND;VALUE=DATE:20250430 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:5g1p@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250508 +DTEND;VALUE=DATE:20250508 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:w7fa@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20250611 +DTEND;VALUE=DATE:20250611 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +BEGIN:VEVENT +UID:wwi5@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART;VALUE=DATE:20251103 +DTEND;VALUE=DATE:20251103 +X-MICROSOFT-CDO-ALLDAYEVENT:TRUE +X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE +SUMMARY:Override Event +END:VEVENT +END:VCALENDAR \ No newline at end of file diff --git a/calendar/Override_Calendar.json b/calendar/Override_Calendar.json new file mode 100644 index 0000000..7e258d2 --- /dev/null +++ b/calendar/Override_Calendar.json @@ -0,0 +1,11 @@ +{ + "id": "Override_Calendar", + "linkGroupName": "Override Calendar", + "calendars": [ + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\tests\\test_calendars\\San_Francisco_Public_Holidays.ics", + "prefix": "Override Event", + "override": true + } + ] +} \ No newline at end of file diff --git a/calendar/Time_Based_Calendar.ics b/calendar/Time_Based_Calendar.ics new file mode 100644 index 0000000..c7bd4a7 --- /dev/null +++ b/calendar/Time_Based_Calendar.ics @@ -0,0 +1,46 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//sebbo.net//ical-generator//EN +NAME:Time Based Calendar +X-WR-CALNAME:Time Based Calendar +BEGIN:VEVENT +UID:4pz8@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART:20241001T183000Z +DTEND:20241001T193000Z +SUMMARY:other_work calmerge +END:VEVENT +BEGIN:VEVENT +UID:wlgj@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART:20241010T173000Z +DTEND:20241010T183000Z +SUMMARY:other_work to do +END:VEVENT +BEGIN:VEVENT +UID:g5xa@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART:20240930T113000Z +DTEND:20240930T123000Z +SUMMARY:work other work +END:VEVENT +BEGIN:VEVENT +UID:oncs@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART:20241003T190000Z +DTEND:20241003T200000Z +SUMMARY:work progodessey +END:VEVENT +BEGIN:VEVENT +UID:n4eg@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T004037Z +DTSTART:20241009T173000Z +DTEND:20241009T183000Z +SUMMARY:work do +END:VEVENT +END:VCALENDAR \ No newline at end of file diff --git a/calendar/Time_Based_Calendar.json b/calendar/Time_Based_Calendar.json new file mode 100644 index 0000000..896a70c --- /dev/null +++ b/calendar/Time_Based_Calendar.json @@ -0,0 +1,16 @@ +{ + "id": "Time_Based_Calendar", + "linkGroupName": "Time Based Calendar", + "calendars": [ + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\tests\\test_calendars\\other_work.ics", + "prefix": "other_work", + "override": false + }, + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\tests\\test_calendars\\work.ics", + "prefix": "work", + "override": false + } + ] +} \ No newline at end of file diff --git a/calendar/test.ics b/calendar/test.ics new file mode 100644 index 0000000..0d0b4c7 --- /dev/null +++ b/calendar/test.ics @@ -0,0 +1,30 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//sebbo.net//ical-generator//EN +NAME:test +X-WR-CALNAME:test +BEGIN:VEVENT +UID:4t6i@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T002033Z +DTSTART:20240930T113000Z +DTEND:20240930T123000Z +SUMMARY:work other work +END:VEVENT +BEGIN:VEVENT +UID:3yag@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T002033Z +DTSTART:20241003T190000Z +DTEND:20241003T200000Z +SUMMARY:work progodessey +END:VEVENT +BEGIN:VEVENT +UID:k6p3@Ryan-jr +SEQUENCE:0 +DTSTAMP:20241107T002033Z +DTSTART:20241009T173000Z +DTEND:20241009T183000Z +SUMMARY:work do +END:VEVENT +END:VCALENDAR \ No newline at end of file diff --git a/calendar/test.json b/calendar/test.json new file mode 100644 index 0000000..b53bb4d --- /dev/null +++ b/calendar/test.json @@ -0,0 +1,11 @@ +{ + "id": "test", + "linkGroupName": "test", + "calendars": [ + { + "prefix": "work", + "override": false, + "url": "https://calendar.google.com/calendar/ical/b4c66eb4bb2cc15257d071bab3f935385778b042112ea1aaedada47f3f1a6e3a%40group.calendar.google.com/public/basic.ics" + } + ] +} \ No newline at end of file diff --git a/directory_tree.txt b/directory_tree.txt new file mode 100644 index 0000000..dc65f64 --- /dev/null +++ b/directory_tree.txt @@ -0,0 +1,38 @@ +. +./.babelrc +./.git +./.git/COMMIT_EDITMSG +./.git/config +./.git/description +./.git/FETCH_HEAD +./.git/HEAD +./.git/hooks +./.git/index +./.git/info +./.git/logs +./.git/objects +./.git/ORIG_HEAD +./.git/refs +./.gitignore +./calendar +./calendar.test.js +./directory_tree.txt +./index.html +./jest.config.cjs +./node_modules +./package-lock.json +./package.json +./README.md +./script.js +./server.js +./styles.css +./temp_test_calendar +./temp_test_calendar/Date_Based_Calendar.json +./temp_test_calendar/No_Prefix_Calendar.ics +./temp_test_calendar/No_Prefix_Calendar.json +./temp_test_calendar/Override_Calendar.json +./temp_test_calendar/Time_Based_Calendar.json +./tests +./tests/expected_outputs +./tests/test_calendars +./__snapshots__ diff --git a/server.js b/server.js index 429ade8..2a538e1 100644 --- a/server.js +++ b/server.js @@ -9,7 +9,7 @@ const app = express(); app.use(express.json()); // Determine the merged calendars directory based on the environment -const MERGED_CALENDARS_DIR = 'calendar'; +const MERGED_CALENDARS_DIR = path.join(__dirname, 'calendar'); console.log(`Merged calendars directory: ${MERGED_CALENDARS_DIR} under ${process.cwd()}`); // Ensure the merged calendars directory exists diff --git a/temp_test_calendar/Date_Based_Calendar.json b/temp_test_calendar/Date_Based_Calendar.json new file mode 100644 index 0000000..2cb693c --- /dev/null +++ b/temp_test_calendar/Date_Based_Calendar.json @@ -0,0 +1,16 @@ +{ + "id": "Date_Based_Calendar", + "linkGroupName": "Date Based Calendar", + "calendars": [ + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\test_calendars\\ferien_bayern_2023.ics", + "prefix": "Ferien_Bayern_2023", + "override": false + }, + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\test_calendars\\US_Holidays.ics", + "prefix": "US_holidays", + "override": false + } + ] +} \ No newline at end of file diff --git a/temp_test_calendar/No_Prefix_Calendar.ics b/temp_test_calendar/No_Prefix_Calendar.ics index c43e84d..00ce993 100644 --- a/temp_test_calendar/No_Prefix_Calendar.ics +++ b/temp_test_calendar/No_Prefix_Calendar.ics @@ -3,264 +3,4 @@ VERSION:2.0 PRODID:-//sebbo.net//ical-generator//EN NAME:No Prefix Calendar X-WR-CALNAME:No Prefix Calendar -BEGIN:VEVENT -UID:tnmq@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20231231 -DTEND;VALUE=DATE:20231231 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day -END:VEVENT -BEGIN:VEVENT -UID:x9od@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240101 -DTEND;VALUE=DATE:20240101 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day Holiday -END:VEVENT -BEGIN:VEVENT -UID:pbj3@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240102 -DTEND;VALUE=DATE:20240102 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day Holiday -END:VEVENT -BEGIN:VEVENT -UID:yjrz@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240103 -DTEND;VALUE=DATE:20240103 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day Holiday -END:VEVENT -BEGIN:VEVENT -UID:l0hs@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240104 -DTEND;VALUE=DATE:20240104 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day Holiday -END:VEVENT -BEGIN:VEVENT -UID:zkw7@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240106 -DTEND;VALUE=DATE:20240106 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Orthodox Christmas -END:VEVENT -BEGIN:VEVENT -UID:crak@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240107 -DTEND;VALUE=DATE:20240107 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Orthodox Christmas Holiday -END:VEVENT -BEGIN:VEVENT -UID:g3k3@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240222 -DTEND;VALUE=DATE:20240222 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Defender of the Fatherland -END:VEVENT -BEGIN:VEVENT -UID:3wyk@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240307 -DTEND;VALUE=DATE:20240307 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Intl. Women's Day -END:VEVENT -BEGIN:VEVENT -UID:xe9r@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240430 -DTEND;VALUE=DATE:20240430 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Spring and Labor Day -END:VEVENT -BEGIN:VEVENT -UID:zvwz@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240508 -DTEND;VALUE=DATE:20240508 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Victory Day -END:VEVENT -BEGIN:VEVENT -UID:nq99@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20240611 -DTEND;VALUE=DATE:20240611 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Russia Day -END:VEVENT -BEGIN:VEVENT -UID:4to5@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20241103 -DTEND;VALUE=DATE:20241103 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Civil Unity Day -END:VEVENT -BEGIN:VEVENT -UID:8xud@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20241231 -DTEND;VALUE=DATE:20241231 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day -END:VEVENT -BEGIN:VEVENT -UID:6rtb@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250101 -DTEND;VALUE=DATE:20250101 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day Holiday -END:VEVENT -BEGIN:VEVENT -UID:8my7@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250102 -DTEND;VALUE=DATE:20250102 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day Holiday -END:VEVENT -BEGIN:VEVENT -UID:fbp4@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250103 -DTEND;VALUE=DATE:20250103 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day Holiday -END:VEVENT -BEGIN:VEVENT -UID:y0f4@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250104 -DTEND;VALUE=DATE:20250104 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: New Year's Day Holiday -END:VEVENT -BEGIN:VEVENT -UID:znnb@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250106 -DTEND;VALUE=DATE:20250106 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Orthodox Christmas -END:VEVENT -BEGIN:VEVENT -UID:dnyl@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250107 -DTEND;VALUE=DATE:20250107 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Orthodox Christmas Holiday -END:VEVENT -BEGIN:VEVENT -UID:fuzr@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250223 -DTEND;VALUE=DATE:20250223 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Defender of the Fatherland -END:VEVENT -BEGIN:VEVENT -UID:y1tk@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250309 -DTEND;VALUE=DATE:20250309 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Intl. Women's Day -END:VEVENT -BEGIN:VEVENT -UID:c6yc@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250430 -DTEND;VALUE=DATE:20250430 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Spring and Labor Day -END:VEVENT -BEGIN:VEVENT -UID:ee8h@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250508 -DTEND;VALUE=DATE:20250508 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Victory Day -END:VEVENT -BEGIN:VEVENT -UID:pgkw@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20250611 -DTEND;VALUE=DATE:20250611 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Russia Day -END:VEVENT -BEGIN:VEVENT -UID:irr5@Ryan-jr -SEQUENCE:0 -DTSTAMP:20241106T123301Z -DTSTART;VALUE=DATE:20251103 -DTEND;VALUE=DATE:20251103 -X-MICROSOFT-CDO-ALLDAYEVENT:TRUE -X-MICROSOFT-MSNCALENDAR-ALLDAYEVENT:TRUE -SUMMARY: Civil Unity Day -END:VEVENT END:VCALENDAR \ No newline at end of file diff --git a/temp_test_calendar/No_Prefix_Calendar.json b/temp_test_calendar/No_Prefix_Calendar.json new file mode 100644 index 0000000..4060684 --- /dev/null +++ b/temp_test_calendar/No_Prefix_Calendar.json @@ -0,0 +1,11 @@ +{ + "id": "No_Prefix_Calendar", + "linkGroupName": "No Prefix Calendar", + "calendars": [ + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\test_calendars\\San_Francisco_Public_Holidays.ics", + "prefix": "", + "override": false + } + ] +} \ No newline at end of file diff --git a/temp_test_calendar/Override_Calendar.json b/temp_test_calendar/Override_Calendar.json new file mode 100644 index 0000000..95cb875 --- /dev/null +++ b/temp_test_calendar/Override_Calendar.json @@ -0,0 +1,11 @@ +{ + "id": "Override_Calendar", + "linkGroupName": "Override Calendar", + "calendars": [ + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\test_calendars\\San_Francisco_Public_Holidays.ics", + "prefix": "Override Event", + "override": true + } + ] +} \ No newline at end of file diff --git a/temp_test_calendar/Time_Based_Calendar.json b/temp_test_calendar/Time_Based_Calendar.json new file mode 100644 index 0000000..b987c9f --- /dev/null +++ b/temp_test_calendar/Time_Based_Calendar.json @@ -0,0 +1,16 @@ +{ + "id": "Time_Based_Calendar", + "linkGroupName": "Time Based Calendar", + "calendars": [ + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\test_calendars\\other_work.ics", + "prefix": "other_work", + "override": false + }, + { + "url": "C:\\Users\\user\\OneDrive\\Desktop\\Internship_tasks\\final calmerg\\test_calendars\\work.ics", + "prefix": "work", + "override": false + } + ] +} \ No newline at end of file