1.2.2 • Published 9 years ago

tvguide v1.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

nodejs - tvguide

8-4-2015 Time fix... again

Since I've been quite active with my Pi home automation lately, I thought I'd finally tackle the still sketchy wait time calculation. The main issue wasn't the code so much as my Pi not being set to the correct timezone - although there may have been something wrong with the code (at the very least it's cleaner now).

If you're using Raspbian (or any kind of Linux, I suppose), check if your timezone is correct by typing

in your terminal. If this doesn't show the correct time AND timezone offset, do the following:

Make sure that after /zoneinfo/ you choose your correct location!

Description

tvguide is a Node.JS module that takes data from tvgids.nl and calls back with a list of new show information every time a new show starts. The module can be used to make a web app that provides real-time tv show information on the channels of your choice. Currently, only the running and next shows are listed. Maybe I will implement a full guide later.

Install

As always, use the npm package manager:

Next, include the module with a require at the top of your node server script

Below is the full reference, but for the trial-and-error users, the following snippet is all that is implemented in my own server.js:

The fun stuff

This NPM library is part of a bigger project - which is a universal remote/tv guide web app hosted on a Raspberry pi. The ingredients:

Function reference

Channel list functions

The channel list is an array of numbers representing a TV channel.

Guide fields functions

The guide fields is an array of strings representing channel information (show name, start time, etc.) Channels are indexed 0,1,2,... in the order defined by the channel list (previous section).

Guide functions

The guide contains an updated version of all channels in the channel list. It contains the currently playing and the next show. For some reason, the Date() function in node doesn't always adjust for local timezone, so a function to adjust for the timezone is present.

Updater functions

The updater auto-updates the guide when new show information is available. In order to acces the guide as soon as it's updated.

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago