summaryrefslogtreecommitdiff
path: root/driver-async.pl
blob: 0d8e86abded75dce2485a4201b5f69df13d4dbcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env perl 
use strict;
use warnings;
use 5.014;
use lib 'lib';
use HomePanel::Driver;
use Path::Tiny;
use Config::Any;
 
my $cfg_set = Config::Any->load_files({
    files => \@ARGV,
    use_ext => 1,
});
 
my %config = map { %{(values %$_)[0]} } @$cfg_set;
 
my $hp = HomePanel::Driver->new({
    template_file => ($config{template} || path(__FILE__)->parent->child('forecast.html.tt')),
    output_file => ($config{output_file} || path(__FILE__)->parent->child('forecast.html')),
    forecast_key => $config{forecast_key},
});
 
$hp->start;
$hp->loop->run;