Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cwlsn/ics-to-json
📅 Convert ICS calendars (eg. Google Calendar) to an opinionated JSON format.
https://github.com/cwlsn/ics-to-json
converter google-calendar ical ics json
Last synced: 5 days ago
JSON representation
📅 Convert ICS calendars (eg. Google Calendar) to an opinionated JSON format.
- Host: GitHub
- URL: https://github.com/cwlsn/ics-to-json
- Owner: cwlsn
- License: mit
- Created: 2018-04-11T23:52:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-30T20:09:17.000Z (2 months ago)
- Last Synced: 2025-01-19T22:14:01.149Z (13 days ago)
- Topics: converter, google-calendar, ical, ics, json
- Language: TypeScript
- Size: 4.03 MB
- Stars: 50
- Watchers: 5
- Forks: 20
- Open Issues: 10
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
---
Convert the ICS calendar format to JSON data to consume in web apps.
## Usage
```js
import { icsToJson } from 'ics-to-json';// Get ICS text however you like, example below
// Make sure you have the right CORS settings if needed
const convert = async (fileLocation) => {
const icsRes = await fetch(fileLocation);
const icsData = await icsRes.text();
// Convert
const data = icsToJson(icsData);
return data;
};
```## Format
Result is an array of:
```js
{
startDate: '20180505T020000Z',
endDate: '20180505T060000Z',
description: 'Big Event!',
location: 'The place!',
summary: 'Summary!'
}
```## Upcoming
- Ability to reverse conversion
- Include the rest of the keys from the ICS format