done to output.ics
This commit is contained in:
parent
67babeac15
commit
cc5ab4227a
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { GoogleCalendarEvent } from "./types";
|
import { GoogleCalendarEvent } from "./types";
|
||||||
import * as ics from 'ics';
|
import * as ics from 'ics';
|
||||||
|
|
||||||
const uuid = require('uuid').v4;
|
const uuid = require('uuid').v4();
|
||||||
|
|
||||||
|
|
||||||
export default class Ics {
|
export default class Ics {
|
||||||
|
@ -34,7 +34,7 @@ export default class Ics {
|
||||||
alarms: [],
|
alarms: [],
|
||||||
categories: [],
|
categories: [],
|
||||||
organizer: { name: 'Maccabi Haifa F.C.', email: '' },
|
organizer: { name: 'Maccabi Haifa F.C.', email: '' },
|
||||||
uid: uuid
|
uid: uuid.toString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
const { error, value } = ics.createEvent(icsEvent);
|
const { error, value } = ics.createEvent(icsEvent);
|
||||||
|
|
|
@ -36,7 +36,7 @@ const app = new App();
|
||||||
const start = async () => {
|
const start = async () => {
|
||||||
const games = await app.gameSource.getGamesFromHaifa();
|
const games = await app.gameSource.getGamesFromHaifa();
|
||||||
const icsEvents = app.ics.generateIcsOutputFromGames(games);
|
const icsEvents = app.ics.generateIcsOutputFromGames(games);
|
||||||
console.log(icsEvents)
|
fs.writeFileSync('output.ics', icsEvents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue