summaryrefslogtreecommitdiff
path: root/driver.pl
diff options
context:
space:
mode:
Diffstat (limited to 'driver.pl')
-rw-r--r--driver.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/driver.pl b/driver.pl
new file mode 100644
index 0000000..dacda01
--- /dev/null
+++ b/driver.pl
@@ -0,0 +1,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;