Find your local library with a text message!2009-03-20
Today I am very proud to announce that I’ve created the service I wished for ten years ago.
Text LIBRARY 12345 to 41411, assuming that your ZIP code is 12345 (and if it is, how’s the weather in Schenectady?). You will get a text message with the name, address, and phone number of the nearest library.
Here’s how it works:
- You send the text message “LIBRARY 12345″ to 41411 (TextMarks).
- TextMarks uses the word LIBRARY to assign the rest of the message (“12345″) to my TextMarks application.
- My TextMarks application sends the rest of the message (in this case, your ZIP code) to a server at freeshell.org. Running PHP scripts on freeshell.org isn’t free, but for a one-time $36 donation, you get that privilege.
- freeshell.org searches
NCESIMLS for branch and central libraries, then finds the first result and identifies the name, address, and phone number in its HTML code.
- freeshell.org sends back a very simple result with newlines where appropriate (view the source to see how it’s really formatted).
- TextMarks sends you the literal answer from freeshell.org, plus a brief advertisement with which TextMarks pays the bills. (I don’t see a penny from this except when y’all phone up potential employers and tell them they’d do well to hire me for 2010.)
Things I’d like to add eventually:
- Support for other location forms like SCHENECTADY[,] NY or 1060 w addison st chicago il, probably with a call to a Google Maps API
- Support for libraries outside the US (though I caution you, if you give me a location on the south end of Grosse Ile, Michigan, my script won’t know that the Essex County Library in Amherstburg, Ontario is nearer than Bacon Memorial Library in Wyandotte, Michigan — though in that particular case you might not care unless you have a boat)
- A minor efficiency tweak: search for libraries within 1 mile, and if none are found, try again with 5 miles, 10 miles, and 50 miles before giving up.
- If no results are found, say so apologetically.
Please tell everyone about it, especially truckers and other business travelers, snowbirds, people who are moving to a new home, etc.
And please let me know what you think, and how to improve it! Thanks especially to Susan Hansen for suggesting IMLS as a more recent source of data.