1# Generate tv_grab_hr from tv_grab_se_swedb.in.
2#
3
4use strict;
5
6use IO::File;
7my $out = shift @ARGV; die "no output file given" if not defined $out;
8my $in = 'grab/se_swedb/tv_grab_se_swedb.in';
9my $out_fh = new IO::File "> $out" or die "cannot write to $out: $!";
10my $in_fh = new IO::File "< $in" or die "cannot read $in: $!";
11my $seen = 0;
12while (<$in_fh>) {
13    s/\@\@name/tv_grab_hr/;
14    s/\@\@nspc/          /;
15    s/\@\@country/Croatia/;
16    s/\@\@desc/Croatia/;
17    s%\@\@url%http://www.gonix.net/xmltv/channels.xml.gz%;
18    s%\@\@site%http://www.gonix.net/%;
19    print $out_fh $_;
20}
21close $out_fh or die "cannot close $out: $!";
22close $in_fh or die "cannot close $in: $!";
23
24