summaryrefslogtreecommitdiff
path: root/driver.pl
blob: dacda019f3940859f34c3d3793bf8d23a91dac9c (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
25
26
#!/usr/bin/env perl 
use strict;
use warnings;
use 5.014;
use WebService::ForecastIo::Response;
use TFL::Bus;
use HomePanel::Render;
use Path::Class;
 
my $forecast = WebService::ForecastIo::Response->new(
    file($ARGV[0])->slurp(iomode=>'<:raw')
);
my $bus = TFL::Bus->new()->request(TFL::Bus::Request->new({
    StopPointName => 'Hotspur Road',
    #Towards => 'Islip Manor', 
    ReturnList => [qw(StopID StopCode1 VisitNumber TripID VehicleID LineID LineName DirectionID DestinationText DestinationName EstimatedTime)],
}));
my $template = file(__FILE__)->parent->file('forecast.html.tt');
 
print
    HomePanel::Render->new({
        template_file => $template,
        forecast => $forecast,
        bus => $bus,
        tube => '',
    })->render;