done to output.ics

This commit is contained in:
Kfir Dayan 2023-03-28 17:32:32 +03:00
parent 67babeac15
commit cc5ab4227a
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
import { GoogleCalendarEvent } from "./types";
import * as ics from 'ics';
const uuid = require('uuid').v4;
const uuid = require('uuid').v4();
export default class Ics {
@ -34,7 +34,7 @@ export default class Ics {
alarms: [],
categories: [],
organizer: { name: 'Maccabi Haifa F.C.', email: '' },
uid: uuid
uid: uuid.toString(),
};
const { error, value } = ics.createEvent(icsEvent);

View file

@ -36,7 +36,7 @@ const app = new App();
const start = async () => {
const games = await app.gameSource.getGamesFromHaifa();
const icsEvents = app.ics.generateIcsOutputFromGames(games);
console.log(icsEvents)
fs.writeFileSync('output.ics', icsEvents);
}