Two different configurations

Discussion of my XMLTV Radio Times grabber
Post Reply
Mahoney

Two different configurations

Post by Mahoney » Tue Jun 07, 2005 10:01 am

Hi,

Firstly, thanks very much for your excellent app - I'm using it with SageTV and it's great.

I would like to have two different confiigurations of your app set up to run automatically once a night - one for Sky with all the channels, saving to e.g. sky.xml, and one for analogue terrestrial with just 1-5 saving to e.g. analogue.xml. So a couple of questions:

1) Are there command line parameters to specify:
- AltChIds.txt equivalent to use
- userchannels.txt equivalent to use
- output location to use

2) If not, should I be OK installing twice to two separate locations? I *guess* so as it doesn't look as if you use the registry, butt I'd like to check!

Cheers,
Rob

Mahoney

Post by Mahoney » Tue Jun 07, 2005 10:35 am

2), of course, beged a response of Why not try it? - so I have. And it works fine. So that's my problem solved!

alanbirtles
Site Admin
Posts: 495
Joined: Mon Sep 06, 2004 4:44 pm

Post by alanbirtles » Tue Jun 07, 2005 11:14 am

a different way to do it is to use a batch file to rename thee files:

Code: Select all

@echo off
if  NOT exist userchannels.txt goto start
echo Backing up userchannels.txt
ren userchannels.txt uc.bak
:start
echo using "%1" for channel list
ren %1 userchannels.txt
echo Running XMLTVRT
xmltvrt /Grab
if NOT exist %2 goto rendat
echo Deleting existing data file "%2"
del %2
:rendat
echo Renaming "data.xml" to "%2"
ren data.xml %2
echo Renaming userchannels.txt back to "%1"
ren userchannels.txt %1
if NOT exist uc.bak goto end
echo Restoring userchannels.txt backup
ren uc.bak userchannels.txt
:end
@echo on
this can then be run by calling "xmltv.bat newuserchannels.txt newdata.xml"

Mahoney

Post by Mahoney » Tue Jun 07, 2005 1:59 pm

Cool - excellent idea. I'm rubbish with batch files, so thanks for the code to do it too!

alanbirtles
Site Admin
Posts: 495
Joined: Mon Sep 06, 2004 4:44 pm

Post by alanbirtles » Tue Jun 07, 2005 10:03 pm

version 2.18 has now been released which should make this easier:
To specify a directory to retrieve the configuration from simply add the following to the command line
"/cDirectory"
The directory should be a subdirectory of the main xmltv directory, any configuration files not found in the supplied directory will be taken from the xmltv directory instead. This option is available on both the GUI and console versions and is used in the same way on both versions.

Post Reply