Searching for books

I’m sure that as Christmas and my birthday approach, the question that is forefront of all of your minds is: “how can I buy Tony new books if I don’t know which ones he already has?”

Well, perhaps not. But it might well be something you need to know at some point, and I have the answer for you. Our book list includes all ‘my’ books as well as Olyvia’s and Samuel’s, so if you wanted to know if one of them had a particular book, you can also use this.

All you need to do is txt (SMS) one of the numbers on this page (for example +31646560497) and start the message with “+book” (to get a plus on most phones, you hold down the zero, and don’t include the quotation marks or put any spaces between the plus and the “book”).

Once you’ve done this, enter a space and your ‘search query’ – i.e. the title of the book that you want to know if we own or not. The search ignores case (so SHOUT if you like, or be lazy and don’t capitalise names) and you only need to put in part of the title. For example, if I sent the txt “+book Potter”, then it would find all the Harry Potter books (and also “Pottery for beginners”, if we owned such a book).

You will get a txt back from the system with the titles of any books that match, or a message saying that no match could be found. If multiple titles are found then it will return as many as fit in a single txt (so being a bit specific is probably useful).

It checks for new requests evey 5 minutes, so there might be a bit of a delay – it also on’t work if ihug has dropped my Internet connection again. If this is too slow, let me know and I can change it easily enough. If there are any problems or suggestions, let me know about those too (either in the comments or via email).

The system will delete the queries it gets after it has dealt with them, so that I don’t find out what people are querying. If you’re interested in the technical details of how I put this together, you can read all about it. Let me know if you try it and whether you have any success.

2 thoughts on “Searching for books

  1. The sms-to-email part of this is proving a bit weak and unreliable, so I’m on the lookout for something to replace that so that this works more reliably.

    In the meantime, the “books” link on the main page takes you to a complete list, which is automatically updated each night. Go buy a book 😉

  2. This is up and working again (as long as my work computer has an active Internet connection, which should be nearly always).

    Use +17323224014 as the number, and make sure that the SMS starts with +book (make sure you have the plus sign at the start) and then has the word(s) you’re searching for after that.

    I’ve also improved it slightly so that if the results would go over one SMS, they’ll be converted to an abbreviated ‘txt-speak’ form, and go to a three SMS response if necessary. The script runs every five minutes, so there could be up to a five minute delay in the response.

    I’m still looking for a better system for the incoming part of this (something that can receive an SMS and deliver it via something that isn’t email would be good) if anyone knows of anything.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s