Aquarionics

/home/a/aquarion/sites/www.aquarionics.com/epistula/contrib/blogroll.sh

All my code (That is, anything not in the "Others" list on the right) is BSD licenced.

You can also view this page as text/plain or colour-coded source


#!/bin/bash

## Set some handy parameters

#Bloglines account name
account="aquarion"
# WGet Executable
wget="wget"
# Where to put the finished file
file="/home/webusers/aquarion/sites/aquarionics/data/blogroll.html"



# If there's already a backup file, delete it.
if [[ -e $file.bak ]]
then
    rm $file.bak
fi

# If there's already a final file, turn it into a backup file.
if [[ -e $file ]]
then
    mv $file $file.bak
fi

#Get the new blogroll as a temporary file
$wget -qq "http://rpc.bloglines.com/blogroll?html=1&id=$account" -O $file.pre

# Strip out the horrible <p /> tags and send it to the final location
cat $file.pre | sed -e"s#<p />##g" > $file

# then get rid of the temporary file
rm $file.pre

# Finally, output a diff of the old blogroll against the new one,
# since this is run from cron if there are any differences, they get mailed to me.
if [[ -e $file.bak ]]
then
    diff $file.bak $file
fi


Using a heavily customised version of Tom's PHPCode2ValidXHTML Thing

Nicholas 'Aquarion' Avenell is a web developer in London, you can find out more about him or how to get in touch.

There are more Articles, Projects, Journal Entries, Photographs and things that defy description here, too.

If you're looking for something specific, there are Calendar & Category -based lists of everything.

And if you want to follow stuff that appears here, try a Syndication Feed, or the generic Feed of everything.


Aquarion's last Twitter was: [updating]
Twitter last updated


© 2000 to 2008 inclusive Nicholas Avenell
All comments are the property of their creators, published with permission
(Unless otherwise indicated, the opinions and sentiments expressed on this site are those of the author and not of any organisation of which he is an affiliate, including his employer. Caveat Lector, E&OE. sigh)
0.539 seconds, 1 queries, 2.57Mb on Thu, 28 Aug 2008 23:31:32 +0000, Not cached
Generated by Epistula Version 2.0.3