#!/usr/bin/env perl use v5.12; use strict; use warnings; use Data::Dumper; use LWP::Simple; use JSON; if(@ARGV != 1) { say STDERR "usage: $0 conference_id"; exit 1; } my ($conference_id) = @ARGV; sub get_conference { my ($id) = @_; my $json = get("http://api.media.ccc.de/public/conferences/$id"); return decode_json($json); } sub get_event { my ($event) = @_; my $json = get($event->{url}); return decode_json($json); } my $conference = get_conference($conference_id); foreach my $ev (@{$conference->{events}}) { my $event = get_event($ev); my $url = $event->{frontend_link}; #$url =~ s!\.html!/oembed.html!g; printf qq!=== %s ===\n!, $event->{title}; printf qq!
* Vortragsvideo/Download bei [%s media.ccc.de]\n!, $url; }