Page 1 of 1

Two different configurations

Posted: Tue Jun 07, 2005 10:01 am
by Mahoney
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

Posted: Tue Jun 07, 2005 10:35 am
by Mahoney
2), of course, beged a response of Why not try it? - so I have. And it works fine. So that's my problem solved!

Posted: Tue Jun 07, 2005 11:14 am
by alanbirtles
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"

Posted: Tue Jun 07, 2005 1:59 pm
by Mahoney
Cool - excellent idea. I'm rubbish with batch files, so thanks for the code to do it too!

Posted: Tue Jun 07, 2005 10:03 pm
by alanbirtles
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.