Saturday, December 31, 2011

William Law - Holiness and Thankfulness

Here's a brilliant quote I came across today from William Law:

Would you know him who is the greatest saint in the world? It is not he who prays most or fasts most; it is not he who gives most alms; but it is he who is always thankful to God, who receives everything as an instance of God's goodness and has a heart always ready to praise God for it.

If anyone would tell you the shortest, surest way to all happiness and perfection, he must tell you to make a rule to thank and praise God for everything that happens to you. Whatever seeming calamity happens to you, if you thank and praise God for it, it turns into a blessing. Could you therefore work miracles, you would not do more for yourself than by this thankful spirit; it turns all that it touches into happiness.

Quoted by Robert Atwell in Celebrating the Saints, page ii.

Friday, December 30, 2011

Book Search

I buy quite a few Christian books. One chore I thought needed automating was searching the half-a-dozen British Christian book websites to see which have the book and which is cheapest. I couldn't find an easy work around, so I scripted one. My JS skills aren't what they should be, but this seems to work.

<html>
<head>
<script type="text/javascript">
function dosearch() {
var sites=new Array();
sites[1]="http://www.amazon.co.uk/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=";
sites[2]="http://www.eden.co.uk/shop/search.php?category_id=&keyword=";
sites[3]="http://www.wesleyowen.com/search/product/productPowerSearch.jhtml?keywords=";
sites[4]="http://www.bookdepository.co.uk/search?searchTerm=";
sites[5]="http://www.10ofthose.com/search/?query=";
var n=1;
for (n=1;n<=5;n++)
{
var fulladd = sites[n]+ escape(document.searchform.searchterms.value);
window.open(fulladd);
}
}
</script>
<style type="text/css">
p {
font: 12pt Arial;
margin-left: 2cm;
margin-top: 1cm;
}
form {
margin-left: 3cm;
width: 10cm;
padding: 1cm;
}
</style>
<title>John's Christian Book Search</title>
</head>
<body>
<p>Please enter the name of the book you want to find in the box below, and then press "Search".</p>
<form name="searchform" onSubmit="return dosearch();">
<input type="text" name="searchterms">
<input type="submit" name="SearchSubmit" value="Search">
</form>
</body>
</html>

To use: copy and paste that into a text editor. Save it as "books.htm", and it should work. Any title you type into the box should result in you getting five windows/tabs, one for each of the online bookshops I use most often. Feel free to modify the code, redistribute and so on - it can be easily modified to work for any other searching. Just don't charge for it! If you want a copy of the html file, feel free to e-mail me and I'll send you one.