From 33c2c787f28bff04b22ea1f35386929d4db0651d Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 14 Apr 2016 18:50:52 +0200 Subject: adapted schedule generator to changed PV export format diff --git a/lib/RHRD/utils.pm b/lib/RHRD/utils.pm index d87ed70..fbc3933 100755 --- a/lib/RHRD/utils.pm +++ b/lib/RHRD/utils.pm @@ -128,7 +128,7 @@ sub fetch_parse_json my $res = URI::Fetch->fetch($uri, UserAgent => $ua) or return (0, URI::Fetch->errstr); if($res->status == URI::Fetch::URI_GONE()) { - return (0, "This feed has been permanently removed"); + return (0, "This resource has been permanently removed"); } my $json = $res->content; @@ -140,7 +140,7 @@ sub fetch_parse_json return (0, "error parsing import result"); }; - return (1, \$data); + return (1, $data); } diff --git a/utils/rhrd-schedules b/utils/rhrd-schedules index 76d4946..b82bbee 100755 --- a/utils/rhrd-schedules +++ b/utils/rhrd-schedules @@ -23,14 +23,13 @@ use strict; # TODO: remove me!!! -use Data::Dumper::Simple; use lib "../lib/"; - use RHRD::rddb; use RHRD::utils; use String::MkPasswd qw(mkpasswd); +binmode(STDOUT, ":utf8"); sub print_usage { @@ -47,7 +46,13 @@ sub generate return 1; } - print Dumper($data); + for my $entry (@{$data}) { + my $start = ${$entry}{'start'}; + my $title = ${$entry}{'title'}; + my $showid = ${$entry}{'id'}; + + print "$start: ($showid) $title\n"; + } return 0; } -- cgit v0.10.2