Go to file
Ryan Mwangi 00f5fedb2a refactor: encapsulate calendar file saving with saveCalendarFile helper 2024-11-07 14:25:02 +03:00
calendar refactor: refactor sanitizeFilename utility that ensures valid file names 2024-11-07 14:18:18 +03:00
test test: run tests and keep assets in subdirectory 2024-11-07 10:20:56 +01:00
tests/calendar refactor: streamline static file serving 2024-11-07 14:11:09 +03:00
.babelrc create Babel config file 2024-10-30 02:23:50 +03:00
.gitignore test: run tests and keep assets in subdirectory 2024-11-07 10:20:56 +01:00
README.md document how to run the tests 2024-11-04 02:02:30 +03:00
app.js refactor: add starter script 2024-11-07 10:28:11 +01:00
index.html remove refresh calendars button in html 2024-10-25 14:52:41 +03:00
package-lock.json install ical.js to use instead of ical as it's outdated 2024-11-04 14:30:09 +03:00
package.json refactor: add starter script 2024-11-07 10:28:11 +01:00
script.js remove refreshCalendarButton constant in script.js 2024-10-25 14:56:14 +03:00
server.js refactor: encapsulate calendar file saving with saveCalendarFile helper 2024-11-07 14:25:02 +03:00
styles.css Initial commit 2024-09-30 15:55:03 +03:00

README.md

Calendar Merger Project

Overview

The Calendar Merger project is a web application that allows users to merge multiple calendars into a single calendar. It provides a simple and intuitive interface for users to:

  • Add calendars
  • Specify prefixes for each calendar
  • Override event summaries if desired

The application also generates a unique URL for the merged calendar and updates it every hour using a cron job.

Features

  • Merge multiple calendars into a single calendar
  • Specify prefixes for each calendar
  • Optionally override event summaries
  • Generate a unique URL for the merged calendar
  • Automatically update the merged calendar every hour

Requirements

  • Node.js (version 14 or higher)
  • npm (included with Node.js)

Installation

  1. Clone the repository:

    git clone git@forge.ftt.gmbh:ryanmwangi/CalMerger.git
    
  2. Install the dependencies:

    npm install
    
  3. Start the server:

    npm start
    

Running Tests

This project uses Jest for testing to ensure the Calendar Merger works as expected.

Run the test suite:

npm test

Jest will automatically locate and execute all test files, providing pass/fail status and error details in your terminal.

For additional insights, you can run tests in coverage mode:

npm test -- --coverage

This generates a coverage report, showing how much of the codebase is tested.

Key Terms

  • Calendar Feed: A data format that allows users to subscribe to calendar events (e.g., iCalendar .ics format).
  • Webcal: A URL scheme for subscribing to calendar feeds, often used with iCalendar files.
  • CalDAV: An internet standard for accessing and managing calendar data on remote servers.
  • Prefix: A string added to the beginning of a calendar feed URL or identifier for organization.
  • Merged Feed: A single calendar feed combining multiple sources into one unified view.

Usage

  1. Open a web browser and navigate to http://localhost:3000.
  2. Click the Add Calendar button to add a new calendar.
  3. Enter the Link Group Name, calendar URL, prefix, and override options (if needed).
  4. Click the Merge Calendars button to generate the merged calendar.
  5. The merged calendar URL will be displayed on the page.

API Endpoints

  • GET /: Returns the index.html file.
  • POST /merge: Merges the calendars and returns the merged calendar URL.
  • GET /:filename: Returns the merged calendar file.

Contributing

Contributions are welcome! If you'd like to contribute:

  1. Fork the repository.
  2. Make your changes.
  3. Submit a pull request.