2.0.2 • Published 8 years ago
tvcal v2.0.2
TVCal
A Node.js server providing the air dates of upcoming TV show episodes as ical/webcal.
Install
$ npm installStart
$ npm startUse the PORT environment variable to set a custom port (default is 5000).
Usage
Web UI
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.
Get air dates by show titles
webcal://localhost:5000/shows/?q=shameless;brooklyn%20nine-nineGet air dates by TVMaze ids
webcal://localhost:5000/shows/150;49Use as a Module
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())
})Development
$ npm run devTest
$ npm testCredits
This application makes use of the TVMaze API.
License
Licensed under the MIT License.