node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


Calendar merger

Suite of tools to merge multiple external calendars into a single view or a single file for importing.




Default export is a relatively simple function that merges multiple .ics files into one.

merge(inputs, options);
icals = [
    fs.readFileSync('cal.ics', 'utf8'),
    fs.readFileSync('another.ics', 'utf8')
merge(icals, {
    calname: 'Merged Calendar',
    timezone: 'America/Chicago',
    caldesc: 'Two calendars put together'

Calendar name, description, and timezone default to their respective values in the first calendar encountered (inputs[0]);

CLI tool


A small wrapper for the underlying package.

ical-merge <filenames...>
CALNAME="Merged Calendar"\
CALDESC="Two calendars put together"\
ical-merge cal.ics another.ics

Accepts filenames, options are set by environment variables. Output is sent to stdout.

Web service


Web service that serves the calendar webapp and serves merged .ics files.

/combine.ics accepts an array of URLs to externally-hosted .ics files, and responds with the merged file. URLs are specified with PHP-style array syntax: ?urls[]=….

Other /[ID].ics merged files are returned, based on the .env.json configuration file.



Webapp that displays public calendars from Google Calendar in a single view. Uses FullCalendar heavily.

Webapp view



The web service and the webapp require configuration via .env.json in the project's root

    "calendars": {
        "cal1": {
            "calname": "Calendar 1",
            "caldesc": "Calendar 1 desc",
            "timezone": "America/Chicago",
            "color": "#462aa3",
            "googleCalendarId": "[ID]",
            "url": "[ID]"
        "cal2": {
            "calname": "Calendar 2",
            "caldesc": "Calendar 2 desc",
            "timezone": "America/Chicago",
            "color": "#001f3f",
            "subCalendars": [
                    "calname": "Subcalendar 1",
                    "caldesc": "Subcalendar 1 desc",
                    "timezone": "America/Chicago",
                    "color": "#0074D9",
                    "googleCalendarId": "[ID]",
                    "url": "[ID]"
                    "calname": "Subcalendar 2",
                    "caldesc": "Subcalendar 2 desc",
                    "timezone": "America/Chicago",
                    "color": "#7FDBFF",
                    "googleCalendarId": "[ID]",
                    "url": "[ID]"
    "calendarGroups": {
        "basic": {
            "calname": "Group Name",
            "caldesc": "Main calendar group",
            "timezone": "America/Chicago",
            "color": "#36a2eb",
            "calendars": [
    "combine": {
        "calname": "Combined Calendar",
        "caldesc": "Combined calendar desc",
        "timezone": "America/Chicago"

Webapp uses googleCalendarIds, web service uses urls.

FullCalendar instructions for Google Calendar API key and calendar IDs