When I was small, I was the sort of kid who read the dictionary. It probably had a lot to do with wanting to appear smart, but I also did it when nobody was watching, just out of curiosity. It was a source of neverending joy to me to learn about the pretentious words grown-ups liked to use and the totally non-pretentious meanings of their Latin or Greek (or Arabic or Yiddish or Sanskrit) etymological roots.
My parents gave me a 20-volume encyclopedia when I was around 14. Reading an encyclopedia felt a bit different to me than reading a dictionary, it just wasn’t the real thing, because it dealt with real things instead of linguistic representations of real things. (I don’t think anyone who knew me was surprised when I became a computational linguist. I actually found out that was a thing you could do by hearing about lexicography first.)
So the encyclopedia just sort of stood around gathering dust. I moved out to study linguistics, I moved in with my partner, I moved cities when I changed universities, and each time I moved I put all 20 books in a box and thought about what to do with them, and whether I even needed them. It seems dangerous to me to look up words whose definitions were frozen in 2005 and haven’t been updated since. I guess previous generations did that and got away with it?
On the other hand, this particular encyclopedia is really nice. It has colorful pictures and everything. So I tried to think of a way to enjoy the colorful pictures and slightly outdated definitions, and I came up with an idea I really liked.
Since I am a bot sort of person — there’s a list of my bots on my website — , the first thing that came to mind was automating the reading process in some way. A very 2016 thing to do would be scanning the books and sending push notifications to my smartphone every now and then. Physical books are an extremely difficult format to automatically scan on no budget, though.
Thankfully, I had another idea. My reasoning went like this: If I put up an IP camera somewhere in my home that continuously filmed one of the books, I could access that from wherever I am, whenever I want. Or I could post a snapshot regularly to some social media site where some of my other bots already live. The only problem was turning the pages. How do you automatically turn pages when you don’t have a Pageturning Device™? Now that I think about it, a desk fan would be extremely helpful in this context. Film the book, remote control the fan, and have it blast some air at the book periodically in the hopes of turning a page, so you can read the next one.
What I actually did was sort of similar. I put the book and the camera on my balcony. Unfortunately, since the book has a very good paper quality, the pages are a bit heavy, but we’re currently having a windy week where I live, the forecast says it’ll be stormy all week long. Perfect!
So the book and the camera are on my balcony. How do I distribute the images so I can access them from wherever? The camera comes with the promise of sending an email or uploading content to an FTP server when it detects movement or when you schedule it to, but when I told it to, it didn’t. At all. I suspect it’s because I didn’t spend a fortune for the model I got — the settings and protocols were there, but the software implementation of the alarm functionality was so buggy I can’t even.
Fortunately, the protocols were there, somewhere deep in the camera’s brain. As long as I had a URL to access its RTSP stream, I could use ffmpeg to take a snapshot and save it to a file. After that, I run the same functions and cronjobs I always use to schedule my bots’ posts.
I decided to give my balcony book two feeds: One on twitter and one on flickr. The twitter one for the sake of completeness, as almost all my other bots live there. The flickr one seems nice for clicking through from one image to the next.
Both feeds post an image every three hours. I feel that more often would get annoying, but if the time between posts was longer, we’d miss something. Last night was a bit stormy and gave us pictures of some apples, a Roman guy, and the Carribean.
In the interest of accessibility, I decided to add a terrible optical character recognition functionality to the posts. Since the resolution of the images isn’t exactly scan quality, it’s hard to make out words. Tesseract is here to help. The description of each flickr post contains everything Tesseract thinks the page is saying.