I had a need, in one of the projects I have been hacking on recently, for a way for an automated process to send messages to a twitter feed based on certain system events – log file changes, inotify updates, etc.

The various existing projects seemed to do much more than I needed and were not easily apt-getable, so I hacked a quick one together in PHP.

A simple toy, no mistake, but combined with a number of other simple tools turns out to be quite handy for automation, given how twitter (currently) glues many disparate services together and acts as an informal protocol between them.

So, being a good FOSS citizen, here you go. Perhaps it’ll save someone a couple of minutes!

» Visit the project on Github…

Inotify is a Linux subsystem which monitors the filesystem for changes, and provides a way to trigger actions when it does.

This is handy, since it means that your program/demon can avoid polling for changes constantly, making it more efficient and reliable. As an aside, this is how the Linux Dropbox tool works.

I was reminded of its existence by a recent hacker news article, so I decided to have a little play over lunch. Here is a little toy I hacked together which monitors a directory for text files containing URLs. When it detects a new one the script retrieves it via WGET and deposited in a nominated downloads directory.

This is a trivial use of the technology, although it is still quite useful, letting me trigger large downloads via my phone or ipad which then get automatically fetched by my NAS without the need to fire up my desktop machine.

» Visit the project on Github…

Image by Oxygen Team, used under the GPL2 licence.

Over the past few weeks it seems that Twitter has been moving to drastically redefine what the service is about. Moving to limit API connections and placing restrictions on how third parties interface with it.

This has limited the usefulness of third party tools that others love and risks damaging the ecosystem that has built up around the service – although, as I have remarked in the past, building a business around a single third party service is asking for trouble.

Now, there must be sound business reason why the folks at the big blue bird decided to do this but I can’t help feeling that they’re missing an opportunity to reach out to these developers.

Twitter is more than a messaging service, it’s a protocol. It’s a way of loosely connecting services together without having to write a specific connection mechanism, for example, this is how I get IFTTT updating my todo list.

It would be a real shame to see the utility of this sacrificed in order to turn Twitter into just another eyeball engine for adverts. Thankfully, other systems exist, and my hope is that we will see a more distributed ecosystem evolve.

Update 20/9/12: Got an email from IFTTT today, and it seems that they are being forced to remove all Twitter triggers from their service. Which means no more archiving, or traffic updates among other things. I’m sure this must all make sense from a business point of view, but it seems a crying shame to systematically make the service less useful to people.

Image “Fail Whale” by Yiling Lu