2007-01-17, 08:25 PM
I've got cygwin installed, but not sure on passing command/directories etc from windows. Will experiment. There's always a DOS grep from Borland or similar.
2007-01-17, 08:25 PM
I've got cygwin installed, but not sure on passing command/directories etc from windows. Will experiment. There's always a DOS grep from Borland or similar.
2007-01-17, 08:54 PM
grep on it's own won;t work as you need to remove the n lines that make up the show object. It can almost certainly be done in awk.
Cheers Carlito, I'll give that a try.
âIf this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.â
2007-01-17, 09:10 PM
gEd Wrote:It can almost certainly be done in awk. but only by gods
2007-01-17, 09:44 PM
adding these three lines to the bottom of my UpdateEPG.bat file seems to do the trick.
SET GBPVROutputAvoid=TVGuide2.xml SET Shows_To_Avoid=C:\\I-xmltv\\shows_to_avoid.txt FOR /F "DELIMS=;" %%A IN (%Shows_To_Avoid%) DO %XMLTV_Prog% tv_grep --not --title "%%A" <%I-xmltv_DIR%%GBPVROutput% >%I-xmltv_DIR%%GBPVROutputAvoid% Make sure you add them right before the line that reads REM ***Do not add commands below this line*** The file shows_to_avoid.txt needs to be a ; separated list of show names I have attached an example....
----------------------
[SIZE="1"]PVRX2 1.3.11 Shuttle SG33G5 Case Core2Duo E8400 3Ghz -- 4 GB RAM Hauppauge PVR-150 Adaptec AVC-3610 Dual Tuner Onboard Intel GMA 3100 through HDMI -- 500GB 37" Westinghouse LCD (1920 x 1080p) Projects Program Image Tool[/SIZE]
2007-01-17, 09:46 PM
NOTE
You will need to point gbpvr to the file c:\i-xmltv\TVGuide2.xml for the guide data as well...
----------------------
[SIZE="1"]PVRX2 1.3.11 Shuttle SG33G5 Case Core2Duo E8400 3Ghz -- 4 GB RAM Hauppauge PVR-150 Adaptec AVC-3610 Dual Tuner Onboard Intel GMA 3100 through HDMI -- 500GB 37" Westinghouse LCD (1920 x 1080p) Projects Program Image Tool[/SIZE]
2007-01-17, 09:51 PM
NOTE 2
I guess you should probably add this line after the first 2 lines IF EXIST %GBPVROutputAvoid% del "%GBPVROutputAvoid%"
----------------------
[SIZE="1"]PVRX2 1.3.11 Shuttle SG33G5 Case Core2Duo E8400 3Ghz -- 4 GB RAM Hauppauge PVR-150 Adaptec AVC-3610 Dual Tuner Onboard Intel GMA 3100 through HDMI -- 500GB 37" Westinghouse LCD (1920 x 1080p) Projects Program Image Tool[/SIZE]
2007-01-18, 12:10 AM
thanks for your help Carlito. ok, here is what I found.
I couldn't get it to recurse through the show list with the DELIMS=;, so I changed it so that show_to_avoid.txt has one show name per line and I use "DELIMS=¶" . This works ok. The other thing is that the output file from the first pass need to be the input file for the second pass. i.e. the output file has to be renamed to be the input file. I dont' know how you can run more that one command with the FOR /F command, so I split the operation out to another (yeh!!) batch file called parse.cmd. FOR /F "DELIMS=¶" %%A IN (%Shows_To_Avoid%) DO call parse "%%A" parse.cmd ---------- xmltv tv_grep --not --title %1 <data.xml > data.tmp del data.xml ren data.tmp data.xml It works! Also, I can see that with xmlltv, I could remove all "Soaps" by doing this xmltv tv_grep --not --genre "Soap" <data.xml > data.tmp It's rather inefficient as it has to parse the xml file many times but that's not a biggie. The next uber-gEd idea would be if there was an option in the tv guide to add a show to the exclusion list. I'm off to see if I can build this into my xmltv download script. thanks team!
âIf this is the way Queen Victoria treats her prisoners, she doesn't deserve to have any.â
2007-01-18, 12:16 AM
With the suggestions I gave above all should work normally.
All you would have to do is rename TVGuide2.xml to TVGuide.xml after the FOR line...
----------------------
[SIZE="1"]PVRX2 1.3.11 Shuttle SG33G5 Case Core2Duo E8400 3Ghz -- 4 GB RAM Hauppauge PVR-150 Adaptec AVC-3610 Dual Tuner Onboard Intel GMA 3100 through HDMI -- 500GB 37" Westinghouse LCD (1920 x 1080p) Projects Program Image Tool[/SIZE]
2007-01-18, 07:00 AM
Okay, i see what you mean. if you add this to your UpdateEPG.bat file everything should run ok
SET GBPVROutputAvoid=TVGuide2.xml SET Shows_To_Avoid=C:\\I-xmltv\\shows_to_avoid.txt del %GBPVROutputAvoid% FOR /F "TOKENS=* DELIMS=;" %%A IN (%Shows_To_Avoid%) %XMLTV_Prog% tv_grep --not --title "%%A" <%I-xmltv_DIR%%GBPVROutput% >%I-xmltv_DIR%%GBPVROutputAvoid% & del %GBPVROutput% & move %GBPVROutputAvoid% %GBPVROutput% Then just put each show you want skipped on it's own line in shows_to_avoid.txt and place that file in the c:\I-Xmltv\
----------------------
[SIZE="1"]PVRX2 1.3.11 Shuttle SG33G5 Case Core2Duo E8400 3Ghz -- 4 GB RAM Hauppauge PVR-150 Adaptec AVC-3610 Dual Tuner Onboard Intel GMA 3100 through HDMI -- 500GB 37" Westinghouse LCD (1920 x 1080p) Projects Program Image Tool[/SIZE]
2007-01-18, 08:02 PM
Well, in answer to this:
gEd Wrote:Thanks Ton. EPGfilter sounds very close to what I am looking for but can it run an expression against the <title> field only, rather than all fields in the show i.e. not on the sub-title or description fields? Sure it can!!! That's how I fix my "Mythbusters" shows... I match against title starting with "mythbusters" and then do the replace processing...
//Ton
|
|