https://github.com/fabsrc/tvcal
:tv: :calendar: Air dates of upcoming TV show episodes as ical/webcal.
https://github.com/fabsrc/tvcal
calendar ical tv-series tv-shows webcal
Last synced: 5 months ago
JSON representation
:tv: :calendar: Air dates of upcoming TV show episodes as ical/webcal.
- Host: GitHub
- URL: https://github.com/fabsrc/tvcal
- Owner: fabsrc
- License: mit
- Created: 2016-01-30T19:07:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T20:27:19.000Z (almost 4 years ago)
- Last Synced: 2025-04-06T22:11:20.228Z (6 months ago)
- Topics: calendar, ical, tv-series, tv-shows, webcal
- Language: JavaScript
- Homepage:
- Size: 564 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TVCal
[](https://travis-ci.org/fabsrc/tvcal)
[](https://david-dm.org/fabsrc/tvcal)
[](https://david-dm.org/fabsrc/tvcal?type=dev)
[](http://standardjs.com/)A Node.js server providing the air dates of upcoming TV show episodes as ical/webcal.
## Install
```bash
$ npm install
```## Start
```bash
$ npm start
```Use 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
```http
webcal://localhost:5000/shows/?q=shameless;brooklyn%20nine-nine
```### Get air dates by [TVMaze](http://tvmaze.com/) ids
```http
webcal://localhost:5000/shows/150;49
```### Use as a Module
Returns a calendar object which is created by [ical-generator](https://github.com/sebbo2002/ical-generator).
```js
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
```bash
$ npm run dev
```## Test
```bash
$ npm test
```## Credits
This application makes use of the [TVMaze API](http://www.tvmaze.com/api).
## License
Licensed under the [MIT License](http://opensource.org/licenses/mit-license.php).