From 70979599d6567a9f67848f2bdb78dd3af8906078 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 7 Jul 2012 11:05:59 +0000 Subject: o Less piping to make it easier to see where stuff fails. --- README.txt | 6 ++++++ tv.nrk.no.xsl.txt | 1 - update-feed.sh | 7 +++++-- update-feed.sh.txt | 1 - 4 files changed, 11 insertions(+), 4 deletions(-) delete mode 120000 tv.nrk.no.xsl.txt delete mode 120000 update-feed.sh.txt diff --git a/README.txt b/README.txt index cd95ae5..9531917 100644 --- a/README.txt +++ b/README.txt @@ -4,3 +4,9 @@ don't want to poll it all the time? Then this is the thing for you! This is a small experiment to create an atom feed from http://tv.nrk.no. Put the .atom file in your feed reader and you'll get a feed with the recent shows from NRK. + +The source code is available here: +http://trygvis.dyndns.org/~trygvis/git/2012/07/tv.nrk.no-to-atom.git + +Feel free to use the .atom feed directly in your reader or adjust the +script and send me your patches. diff --git a/tv.nrk.no.xsl.txt b/tv.nrk.no.xsl.txt deleted file mode 120000 index c14950c..0000000 --- a/tv.nrk.no.xsl.txt +++ /dev/null @@ -1 +0,0 @@ -tv.nrk.no.xsl \ No newline at end of file diff --git a/update-feed.sh b/update-feed.sh index ef55874..12ac1a2 100755 --- a/update-feed.sh +++ b/update-feed.sh @@ -7,7 +7,7 @@ checksum() { } fetch() { - curl -s http://tv.nrk.no/listobjects/recentlysent | dos2unix | xmllint --html --dropdtd --xmlout - 2> /dev/null > tv.nrk.no.html.new + curl -s -o tv.nrk.no.html.new http://tv.nrk.no/listobjects/recentlysent if [ -r tv.nrk.no.html -a "`checksum tv.nrk.no.html.new`" == "`checksum tv.nrk.no.html`" ] then @@ -16,10 +16,13 @@ fetch() { exit 0 fi + dos2unix tv.nrk.no.html.new + xmllint --html --dropdtd --xmlout tv.nrk.no.html.new 2> /dev/null > tv.nrk.no.html.new2 + mv tv.nrk.no.html.new2 tv.nrk.no.html.new mv tv.nrk.no.html.new tv.nrk.no.html } -# fetch +fetch mkdir -p tmp diff --git a/update-feed.sh.txt b/update-feed.sh.txt deleted file mode 120000 index c0c7c0c..0000000 --- a/update-feed.sh.txt +++ /dev/null @@ -1 +0,0 @@ -update-feed.sh \ No newline at end of file -- cgit v1.2.3