diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2012-10-30 11:40:27 +0100 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2012-10-30 11:40:27 +0100 |
commit | f1717857da8db98772c7a807befe2426ff2ed133 (patch) | |
tree | cacafe715187e1f1074ac7ba9be4847dc29c2b2d /scripts/extract_vdr_chan_ids.pl | |
parent | d723bdc772b60190af39a256bffc33c27cfb9575 (diff) | |
download | vdr-plugin-eepg-f1717857da8db98772c7a807befe2426ff2ed133.tar.gz vdr-plugin-eepg-f1717857da8db98772c7a807befe2426ff2ed133.tar.bz2 |
added helper scripts for generation of eepg.equiv
updated documentation
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" + +} + |