A Node.js server providing the air dates of upcoming TV show episodes as ical/webcal.
$ npm install
$ npm start
Use the PORT
environment variable to set a custom port (default is 5000
).
To select shows to get air dates for go to http://localhost:5000
and use the web UI. It will create a webcal URL which you can add to your calendar.
webcal://localhost:5000/shows/?q=shameless;brooklyn%20nine-nine
Get air dates by TVMaze ids
webcal://localhost:5000/shows/150;49
Returns a calendar object which is created by ical-generator.
const tvcal = require('tvcal')
tvcal({
name: 'Cal-Name',
domain: 'Cal-Domain',
showIds: [150, 49], // Use either showIds or showTitles
// showTitles: ['Shameless', 'Brooklyn Nine-Nine'], // Alternative to showIds
filterDate: new Date(new Date() - 14 * 24 * 60 * 60 * 1000) // Filter episodes which are older than two weeks
}).then(cal => {
console.log(cal.toString())
})
$ npm run dev
$ npm test
This application makes use of the TVMaze API.
Licensed under the MIT License.