RE: Help with sorting another file


Subject: RE: Help with sorting another file
jonr@destar.net
Date: Thu Feb 26 2004 - 21:31:53 AKST


It wasn't my intention to re-ignite the old sed vs. perl argument, if
there ever was one. :)

David, Thanks for the great explanation on that sed line, that was
tremendous help in figuring out what is going on and what some of the
modifiers were that the info sed page didnt really explain so well.

Arthur is correct, the app tv_sort is not adding these stop times into the
file. It looks to see what the start time of the next show on the same
channel is and is able to add the stop time because it knows the start
time of the next show on the same channel. That is my problem.

I didn't post the entire outout of the file I am trying to work on because
it is very large. I have added a better sample below. I would like to have
something that would look for a certain string and remove it and leave all
others intact.

If you want to know exactly what I am doing go to www.freevo.org, it is a
personal video recorder in the same vein as TiVo and ReplayTV. Those 2
services charge you upwards of 9 dollars a month to use them..BAH!

Thanks guys, this is very educational to me, please keep up the discussion
until you solve my problem. ;) Seriously though, thanks for everything and
I am not just sitting back waiting for one of you to solve my problem but
have gotten into sed and trying to understand it, it actually seems quite
easy if you can just remember the syntax.

This is basically how the file looks, I cut some of the program info out
because I don't want an email thats so big. This shows what I am trying to
do, look at the last 2 entries and there is no stop= times. Simply remove
those entries without a stop= time...hahah, simply. ;)

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">

<tv date="20040226101730 -0900" source-info-url="http://www.zap2it.com"
source-info-name="Zap2It" generator-info-name="tv_grab_na V3.20040101"
generator-info-url="http://sourceforge.net/projects/xmltv">
  <channel id="C10goac010.zap2it.com">
    <display-name>10 GOAC010</display-name>
    <display-name>10</display-name>
  </channel>
  <channel id="C11ktva.zap2it.com">
    <display-name>11 KTVA</display-name>
    <display-name>11</display-name>
    <icon src="http://tvlistings2.zap2it.com/tms_network_logos/cbs_30.jpg" />
  </channel>
  <channel id="C12qvc.zap2it.com">
    <display-name>12 QVC</display-name>
    <display-name>12</display-name>
    <icon src="http://tvlistings2.zap2it.com/tms_network_logos/qvc_30.jpg" />
  </channel>
  <channel id="C13kimo.zap2it.com">
    <display-name>13 KIMO</display-name>
    <display-name>13</display-name>
    <icon src="http://tvlistings2.zap2it.com/tms_network_logos/abc_30.jpg" />
  </channel>
  <channel id="C14edac014.zap2it.com">
    <display-name>14 EDAC014</display-name>
    <display-name>14</display-name>
  </channel>
  <channel id="C15edac015.zap2it.com">
    <display-name>15 EDAC015</display-name>
    <display-name>15</display-name>
  </channel>
<programme start="20040226000000 AKST" stop="20040226003000 AKST"
channel="C37spikep.zap2it.com">
    <title>Real TV</title>
    <desc>Skiing accident; speeder stopped by police; boy peels coconuts
with his teeth.</desc>
    <category>Reality</category>
    <audio>
      <stereo>stereo</stereo>
    </audio>
    <subtitles type="teletext" />
    <rating system="VCHIP">
      <value>PG</value>
    </rating>
  </programme>
  <programme start="20040226000000 AKST" stop="20040226003000 AKST"
channel="C40twc.zap2it.com">
    <title>Weather Classroom</title>
    <sub-title>Weather and Geography</sub-title>
    <desc>Erosion; wind; wildfires; storms in various terrains.</desc>
    <category>Edu</category>
  </programme>
  <programme start="20040226000000 AKST" stop="20040226003000 AKST"
channel="C46scifip.zap2it.com">
    <title>Crossing Over With John Edward</title>
    <desc>A woman reunites with family; death of an alcoholic friend.</desc>
    <category>Talk</category>
    <category>Tabloid</category>
    <audio>
      <stereo>stereo</stereo>
    </audio>
    <subtitles type="teletext" />
    <rating system="VCHIP">
      <value>PG</value>
    </rating>
  </programme>
  <programme start="20040226000000 AKST" channel="C47trav.zap2it.com">
    <title>Paid Programming</title>
  </programme>
  <programme start="20040226000000 AKST" channel="C4ktby.zap2it.com">
    <title>Blind Date</title>
    <desc>A high-maintenance gal meets a guy in high-finance; a cover girl
meets a musician.</desc>
    <category>Reality</category>
    <audio>
      <stereo>stereo</stereo>
    </audio>
    <previously-shown />
    <subtitles type="teletext" />
    <rating system="VCHIP">
      <value>PG</value>
    </rating>
  </programme>
</tv>

what if the hoky poky is what its all about.

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Thu Feb 26 2004 - 21:20:59 AKST