NextPVR Forums

Full Version: UK: Digiguide Channel Logos -> NPVR Channel Logos
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

No idea if this will help anyone else out there, but given it took a bit of work, thought I'd share it in case it helps anyone else. For all those in the UK that quickly want to have up to date and pretty channel logos and who use Digiguide for their EPG

I've attached to this file a CSV mapping file of Digiguide channel IDs to NPVR Channel names (based on the Digiguide -> XMLTV). I've done this for most of the common channels - I haven't done the very specialist channels, however.

You can use this to turn the channel logos in digiguides chlogos folder (which are numbered by digiguide internal ID) and turn them into channel_name.png files that NPVR likes and can use.

You can then just run it through Perl (or something similar) in the chlogos directory, I put together something quick like this (note, this is horrible, like most perl) which creates an out directory and drops everything in there:

Code:
#!/usr/bin/perl

use File::Copy qw(copy);
mkdir out;
open($map,"map.txt") or die("Unable to open mapping file called map.txt in current directory");
foreach $line (<$map>) {
    chomp($line);
    @bits = split(",",$line);
    $id = $bits[0];
    $channel = $bits[1];
    copy "$id.ch", "out/$channel.png";
    print "$channel DONE\n";
}

Hope that someone finds this useful, if not, it'll just be me coming back to this thread in a few years time when I've forgotten how I did it the first time!