diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2012-10-30 11:41:51 +0100 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2012-10-30 11:41:51 +0100 |
commit | 95602c8013d49b7e72d20b30109fe15c9c87c939 (patch) | |
tree | 36f5814ec36f797d818f305da2fafc13a3f9c97b /scripts/extract_vdr_chan_ids.pl | |
parent | e6817415cfb958010c64f22b98f4536817223098 (diff) | |
parent | f1717857da8db98772c7a807befe2426ff2ed133 (diff) | |
download | vdr-plugin-eepg-95602c8013d49b7e72d20b30109fe15c9c87c939.tar.gz vdr-plugin-eepg-95602c8013d49b7e72d20b30109fe15c9c87c939.tar.bz2 |
Merge branch 'map-event-ceit2' into epg_short_text
Diffstat (limited to 'scripts/extract_vdr_chan_ids.pl')
-rwxr-xr-x | scripts/extract_vdr_chan_ids.pl | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/scripts/extract_vdr_chan_ids.pl b/scripts/extract_vdr_chan_ids.pl new file mode 100755 index 0000000..e40bbb9 --- /dev/null +++ b/scripts/extract_vdr_chan_ids.pl @@ -0,0 +1,38 @@ +#!/usr/bin/perl -w +# +# extract VDR channel ID's from channels conf +# + +use strict; +use File::Path; + +my $channelsConf = "../channels.conf"; +my $Usage = qq{ +Usage: $0 (default: ../channels.conf) + $0 /path/to/channels.conf +}; + +$channelsConf = "@ARGV" if @ARGV; + +#my $file; +open(MYINPUTFILE, "<$channelsConf") or die("Could not open $channelsConf" . $Usage); + +foreach (<MYINPUTFILE>) +{ + chomp; + if ( /^:.*/ ) + { + print $_ . "\n"; + next; + } + + my($line) = $_; + + my(@tokens) = split(":"); + + my($chanID) = "$tokens[3]-$tokens[10]-$tokens[11]-$tokens[9] $tokens[0]"; + + print $chanID . "\n" + +} + |