diff options
-rw-r--r-- | README.txt | 6 | ||||
l--------- | tv.nrk.no.xsl.txt | 1 | ||||
-rwxr-xr-x | update-feed.sh | 7 | ||||
l--------- | update-feed.sh.txt | 1 |
4 files changed, 11 insertions, 4 deletions
@@ -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 |