All jobs have two common fields: enabled
and interval
.
enabled
should be True
to enable the job. If the key is omitted or False
,
the job won't be enabled.
interval
specifies how often the job should run, in seconds. interval
set to
60
will make the job run every 60 seconds.
Most jobs also accept a timeout
option. This option sets how long a job should
wait for a request to complete, in seconds. Timeout should be lower than
interval to prevent slow jobs from blocking future jobs.
Displays bus routes in Trondheim, Norway. Uses the API provided by atbapi.
JOBS['atb'] = {
'enabled': True,
'interval': 60,
'url': 'http://atbapi.tar.io/api/v1/departures/yourLocationId'
}
Displays future flights for the configured destination. This widget uses data provided by Avinor.
JOBS['avinor'] = {
'enabled': True,
'interval': 180,
'from': 'TRD',
'to': 'OSL'
}
The from
and to
fields are
IATA airport codes.
Displays current and upcoming events in your Google Calendar. This widget uses the Google Calendar API to retrieve data.
JOBS['calendar'] = {
'enabled': True,
'interval': 600,
'client_id': '',
'client_secret': ''
}
The values for client_id
and client_secret
can be created using the
Google Developer Console.
When you have set client_id
and client_secret
in your config file, you need
to run make google-api-auth
to generate a credentials file.
Displays the current unread count, and total mail count in the configured folder.
JOBS['gmail'] = {
'enabled': True,
'interval': 900,
'client_id': '',
'client_secret': '',
'email': '[email protected]',
'folder': 'inbox'
}
The values for client_id
and client_secret
can be created using the
Google Developer Console.
When you have set client_id
and client_secret
in your config file, you need
to run make google-api-auth
to generate a credentials file.
Displays the top 10 trending items on Hacker News. Scrapes data directly from the website.
JOBS['hackernews'] = {
'enabled': True,
'interval': 900
}
Displays upcoming train departures from a configured location. Scrapes data directly from https://www.nsb.no.
JOBS['nsb'] = {
'enabled': True,
'interval': 900,
'from': 'Lillehammer',
'to': 'Oslo S'
}
The from
and to
fields are the same location names as used on the website.
Displays a graph of response times to the given hosts. The hosts
field is
a list of tuples on this format: ('label', 'host or ip')
JOBS['ping'] = {
'enabled': True,
'interval': 10,
'hosts': [
('vg.no', 'vg.no'),
('google.com', 'google.com')
]
}
Displays latest TV shows and movies from Plex Media Server. Plex Media Server
makes metadata for each section available as XML under the URL:
http://<ip>:32400/library/sections/section_number/recentlyAdded/
.
JOBS['plex'] = {
'enabled': True,
'interval': 900,
'movies': 'http://127.0.0.1:32400/library/sections/2/recentlyAdded/',
'shows': 'http://127.0.0.1:32400/library/sections/1/recentlyAdded/'
}
Displays the current track playing on your Sonos device. Also displays the
upcoming track. The ip
field should be the IP of your Sonos device.
JOBS['sonos'] = {
'enabled': False,
'interval': 10,
'ip': '127.0.0.1'
}
Displays beverage consumption stats from the IRC channel #tihlde on freenode.
The max
dict sets the wanted limit for each beverage. nick
is the nick you
want to retrieve stats for.
JOBS['stats'] = {
'enabled': True,
'interval': 600,
'nick': 'yournick',
'max': {
'coffee': 8,
'beer': 12
}
}
Displays current stock quotes using the Yahoo YQL API.
JOBS['stockquotes'] = {
'enabled': True,
'interval': 900,
'symbols': [
'YHOO',
'AAPL',
'GOOG',
'MSFT'
]
}
Ping one or more hosts and display their status (up or down).
JOBS['uptime'] = {
'enabled': True,
'interval': 60,
'hosts': [
{'label': 'Desktop', 'ip': '10.0.0.11'},
{'label': 'Laptop', 'ip': '10.0.0.10'}
]
}
Displays weather data from http://www.yr.no. The url
field specifies the
XML feed to use. Note that Yr requires a polling interval of at least 10
minutes (600 seconds).
JOBS['yr'] = {
'enabled': True,
'interval': 600,
'url': ('http://www.yr.no/sted/Norge/S%C3%B8r-Tr%C3%B8ndelag/Trondheim/'
'Trondheim/varsel.xml')
}