2006-02-14, 01:43 PM
Hi all,
I've been setting up GB-PVR 95.16 over the last week or so and noted that manual one button recordings while watching TV are somewhat limited, and recording manually from the localhost website non-existent without a TV guide entry for the channel one is interested in.
This issue posed a problem for me with my connections to my VCR and cable box being EPG-less. As a result, I developed this small command-line utility to generate an EPG of sorts for a single channel. This way, I can fill out the guide for my VCR and cable TV channels automatically through a batch script. I also thought that others might find it useful, so here it is: UpdateOptusVCREPG.exe. This program generates an xml file to be used as the XMLTV source for the EPG in GB-PVR.
Usage: [/item (default)] denotes an item is optional and its default value
-----------------------------------------------------------------
[/?] - Help: shows this information
[/d (7)] - The number of days in the guide.
[/p (15)] - The period between timeslots in minutes.
/c channel - The channel name.
/t title - The title to use for the time slots.
[/s ()] - The subtitle to use.
[/i ()] - The program description to use.
[/g ()] - The program category to use.
[/o [Path\](Listing2.xml) - Output file name; if Path is omitted, file is created in current directory.
How to Use
Program written in C. Attached below. Post any comments, questions, suggestions, bugs please.
I've been setting up GB-PVR 95.16 over the last week or so and noted that manual one button recordings while watching TV are somewhat limited, and recording manually from the localhost website non-existent without a TV guide entry for the channel one is interested in.
This issue posed a problem for me with my connections to my VCR and cable box being EPG-less. As a result, I developed this small command-line utility to generate an EPG of sorts for a single channel. This way, I can fill out the guide for my VCR and cable TV channels automatically through a batch script. I also thought that others might find it useful, so here it is: UpdateOptusVCREPG.exe. This program generates an xml file to be used as the XMLTV source for the EPG in GB-PVR.
Usage: [/item (default)] denotes an item is optional and its default value
-----------------------------------------------------------------
[/?] - Help: shows this information
[/d (7)] - The number of days in the guide.
[/p (15)] - The period between timeslots in minutes.
/c channel - The channel name.
/t title - The title to use for the time slots.
[/s ()] - The subtitle to use.
[/i ()] - The program description to use.
[/g ()] - The program category to use.
[/o [Path\](Listing2.xml) - Output file name; if Path is omitted, file is created in current directory.
How to Use
- Download the .zip and extract to get the .exe. This is the program so place it where you wish to install it.
- Go to Start, Run and type cmd then click OK. This will open the command prompt.
- Change to the directory where you installed/unzipped the program. The commands to do this are: cd <path> to change directory. If it is on a different drive, you may have to type the drive letter followed by a colon and press Enter: eg D:<ENTER>
- Once in the directory of the program, if you simply execute it by typing its name, you will get the usage instructions posted above.
- To generate your xml file, you need at least two arguments: the channel name (/c) and program title to use for all of the time slots (/t). The rest of the arguments can be ignored and defaults will be used. An example: UpdateOptusVCREPG.exe /c "PayTV" /t "PayTV Program". Note the quotation marks - these are required if you have spaces in your text otherwise the arguments will be truncated.
- The /d argument allows you to specify the number of days you want your guide to cover. The default is 7.
- The /p argument allows you to define the length of each timeslot in minutes (ie length of each "programme"). The default is 15 minutes, but you might find this not to your liking. Perhaps 60 mins is more reasonable. You can customize this as you wish. NOTE: If you use a period that does not divide by 60 with no remainder, your time slot specification may not work. FURTHER NOTE: It seems that there is a bug whereby periods above 60 cause a problem where the program will keep writing the file (until you run out of disk space). For now, safe maximum length of timeslot is 60.
- The /s parameter allows you to enter a sub-title. Default is "".
- The /i parameter allows you to enter a program description that will be used for all periods. Default is "".
- The /g parameter allows you to enter the genre or category of the programs. Default is "".
- The /o argument lets you specify where and under what name you want to output the resulting file. Default is in the program's directory with the name Listing2.xml.
- Having digested all of the above, run the program to generate your xml EPG data. An example: UpdateOptusVCREPG.exe /c "VCR" /t "Video Cassette Recording" /d 14 /p 60 /i "The currently playing video cassette from the archives." /g Archives /o "C:\Multimedia\GBPVR\VCREPG.xml"
- Now that you have your EPG data, enter the config.exe of GB-PVR and go to Capture Sources. Select the source you want to use the EPG data with, click Edit, change EPG source to XMLTV Plugin, click Settings, point to the file you generated, click OK. Update your EPG, click your OKs, check your channels are fine, and you're done. When you go into GB-PVR, the new guide entries should appear.
- You can then make a batch script to run this program and place it in your scheduled tasks to automatically generate the guide data.
Program written in C. Attached below. Post any comments, questions, suggestions, bugs please.