#!/bin/sh tmp="/tmp/map.tmp" if [ "$1" = "" -o "$2" = "" ]; then echo "Usage: $0 /path/to/your /path/to/save/your" exit 1 elif [ ! -e "$1" ]; then echo "$1 not found" exit 1 elif [ -e "$2" ]; then echo "$2 already exist" exit 1 else IFS=: echo """// // ChannelMap for EPG Daemon // -------------------------- // // Format: // : = [,,][:] // // // source 'vdr' or the source name provided by a plugin // extid 000 for vdr or the channle id used by the external EPG provider // cid VDR ChannelID (Src-NID-TID-SID) // // vps one of { y, Y, n, N, 0, 1 } // // channels not listed here will not touched by the plugin // if 'blacklist' in plugin options set to 'yes' the plugin will block all // event data of the DVB stream since the channel is not listed here // //======================================================= // Custom ChannelMap //======================================================= // Channels in alphabetical order. // """ > $2 cut -d: -f1,4,10,11,12 $1 | sed '/^$/d' | sort >> $tmp while read a b c d e do a="${a%%;*}" echo "vdr:000 = $b-$d-$e-$c // $a" >> $2 done < $tmp rm -rf $tmp fi