{"id":38231939,"url":"https://github.com/acmutd/calendar-converter","last_synced_at":"2026-01-17T01:01:03.500Z","repository":{"id":43327584,"uuid":"336745324","full_name":"acmutd/calendar-converter","owner":"acmutd","description":"Convert the ACM event spreadsheet to ics","archived":false,"fork":false,"pushed_at":"2025-09-25T06:35:45.000Z","size":1897,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T08:35:30.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acmutd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-07T09:08:39.000Z","updated_at":"2022-03-08T03:09:51.000Z","dependencies_parsed_at":"2023-11-20T08:03:54.912Z","dependency_job_id":"12e94670-db27-4c90-a9f5-da5cf336167d","html_url":"https://github.com/acmutd/calendar-converter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/acmutd/calendar-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acmutd%2Fcalendar-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acmutd%2Fcalendar-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acmutd%2Fcalendar-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acmutd%2Fcalendar-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acmutd","download_url":"https://codeload.github.com/acmutd/calendar-converter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acmutd%2Fcalendar-converter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T01:00:31.843Z","updated_at":"2026-01-17T01:01:03.461Z","avatar_url":"https://github.com/acmutd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# calendar-converter\n![](https://github.com/acmutd/calendar-converter/actions/workflows/refresh.yml/badge.svg)\n\nA script to automatically convert ACM UTD's event spreadsheet to the [iCalendar](https://wikipedia.org/wiki/ICalendar) format, so it can be displayed as a calendar (like in someone's Google Calendar or on [acmutd.co/events](https://acmutd.co/events)).\n\n## How it works\nUsing [GitHub Actions](./.github/workflows/refresh.yml), this [script](./src/index.ts) runs every 24 hours. The core of the script is given by the few lines at the end:\n```ts\nfetchSpreadsheet()\n  .then(spreadsheetToEvents)\n  .then(eventsToIcs)\n  .then(console.log)\n```\nIt is a pipeline that\n\n1. Fetches the spreadsheet data using the [Google Sheets API](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/get)\n2. Converts the raw data (which is just `any[][]`) to a more structured schema (`Event[]`)\n3. Produces a string in the iCalendar format from that array of `Event`s using the [ics package](https://www.npmjs.com/package/ics)\n4. Sends that string to stdout\n\nThe output of the script is redirected to a file which is then committed and pushed to the [`ics` branch](https://github.com/acmutd/calendar-converter/tree/ics) of this repository. The calendar can then be accessed with the [raw link](https://raw.githubusercontent.com/acmutd/calendar-converter/ics/calendar.ics) to that file (which we have a vanity link for: `https://content.acmutd.co/events`).\n\nThe remaining details are explained in comments in the source code.\n\n## Set up\nFor the script to run correctly, some set up is necessary in both Google Workspace (G Suite) and GitHub Actions.\n\n### Google Workspace\nThe script fetches data using the Google Spreadsheet API. As such, it requires authorization to access the spreadsheet. This requires\n\n1. A GCP project with the Google Sheets API [enabled](https://cloud.google.com/endpoints/docs/openapi/enable-api) (note for ACM officers: this is the \"Calendar Converter\" project)\n2. A [service account](https://cloud.google.com/iam/docs/service-accounts) on that project\n3. Sharing the spreadsheet with the service account (the service account has an email address which you can share to like normal)\n\n### GitHub Actions\nThe script utilizes two [Environment secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) which must be set before running: \n\n* `EVENT_SPREADSHEET_ID`: The ID of the event spreadsheet. This can be found in the URL to the sheet (`https://docs.google.com/spreadsheets/d/THIS_IS_THE_ID/`)\n* `GCP_SA_KEY`: The service account [authentication key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys). It should be the raw JSON string (i.e., not a file name). See [`setup-gcloud`](https://github.com/google-github-actions/setup-gcloud) for more info.\n\n## Local Development\nClone the repo, run `npm install`, build with `npm run build`, run with `npm run start`. It might be more convenient to run the compiler in watch mode which can be done with `npm run build -- --watch`.\n\nThe same Google Workspace set up process described above is required. The `EVENT_SPREADSHEET_ID` environment variable is the same, but Google API authentication will work differently. Instead of the `GCP_SA_KEY` variable, export a `GOOGLE_APPLICATION_CREDENTIALS` variable which has that path to the service account key json file (as opposed to the `GCP_SA_KEY` variable, this _is_ a file path, not the raw JSON string).\n\n##### Getting the Service Account JSON\n\n - Open GCP and navigate to the Calendar Converter project\n - Open up the IAM page and navigate to the Service Accounts tab\n - Select the calendar convert service key and open up the Keys tab\n - Click Add Key and set it to be JSON\n - It will automatically download a `.json` file which you can place in the root of the project\n - You can rename the file to bee `calendar-converter.json` which is included in the `.gitignore`\n\n\nThe environement variables can then be set as follows:\n\n```\n$ export EVENT_SPREADSHEET_ID=\u003cINSERT ID HERE\u003e\n$ export GOOGLE_APPLICATION_CREDENTIALS=\u003cINSERT PATH TO JSON FILE\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facmutd%2Fcalendar-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facmutd%2Fcalendar-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facmutd%2Fcalendar-converter/lists"}