Mercurial > hg > egg-tcls
changeset 182:24f9f38210fe
Add comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 03 Jun 2014 21:37:59 +0300 |
parents | ff23ce8b938f |
children | 4abb7a940e24 |
files | fetch_weather.pl |
diffstat | 1 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/fetch_weather.pl Tue Jun 03 15:34:19 2014 +0300 +++ b/fetch_weather.pl Tue Jun 03 21:37:59 2014 +0300 @@ -1,4 +1,17 @@ #!/usr/bin/perl -w +########################################################################## +# +# Fetch Weather v0.1 by Matti 'ccr' Hamalainen <ccr@tnsp.org> +# (C) Copyright 2014 Tecnic Software productions (TNSP) +# +# Should be ran as a cronjob, and configured properly. +# 15 * * * * /absolute/path/to/fetch_weather.pl </path/to/configfile> +# +# Configuration file example is in weather.config +# +# This script is freely distributable under GNU GPL (version 2) license. +# +########################################################################## use strict; use LWP::UserAgent; use HTML::Entities; @@ -9,7 +22,7 @@ ### -### Globals +### Configuration settings ### my %settings = ( "debug" => 0, @@ -43,6 +56,7 @@ sub parse_timestamp($$) { + # XXX: A bit of a hack, but it works. return str2time($_[0]) - str2time("00:00") + $_[1]; }