- Goozex Economics
- Sending Remote Inotify Events To MediaTomb
- Benchmarking Puppet With JMeter
- Puppet Request Generator
- The Decline Of Gentoo Linux
- Superweek Day 15: Brewers Hill Criterium
- Superweek Day 14: Food Folks and Spokes Criterium
- Superweek Day 13: Heritage Square Criterium
- Superweek Day 12: Howard Cycling Classic
- Superweek Day 11: Cedarburg Cycling Classic
Recent Stories
python
Sending Remote Inotify Events To MediaTomb
February 13, 2009 - 3:46pm — James BellengerMediaTomb is a robust open-source UPnP server that has quickly become an important part of my network. It organizes media in what it calls virtual containers, a fancy but vague term to describe how the media it serves can be organized and displayed according to a hierarchy unrelated to the filesystem on which it resides. This is a great idea, but an abstract hierarchy not defined by the filesystem means that the mediatomb server needs a method for discovering new media and adding it to its database.
Enter Inotify, the new-ish linux kernel feature that allows applications to listen for filesystem events. Mediatomb can be configured to listen for inotify events on interesting directories. This is certainly the only decent way to manage very large media libraries, as the alternative method of periodically rescanning the filesystem for new files is an expensive operation on large or remote libraries.
Using inotify works on simple installations, but it won't work when mediatomb uses NFS or another remote filesystem to access the library. While creating library files on the mediatomb machine itself will go through the kernel VFS layer and generate an inotify event that mediatomb can respond to, changing or creating a file on the NFS server or on any other mounted client will not propagate inotify events to other hosts. Though communicating these remote events appears built in to newer versions of samba, I needed a solution that would work with NFS.
images
July 10, 2007 - 3:27pm — James BellengerI wrote a quick program for triaging images taken from my phone. I can now snap pictures and send them directly to an email address. A bit of python on the other end takes care of rotating, boosting the image contrast (my phone leans towards overexposure), and uploading it to this site.
I took that while out on a mellow cruise this morning. I got my phone out of my pocket, took a picture and emailed it, all in about 30 seconds and without having to slow down or stop peddaling. The picture was sitting pretty in the Loupe block when I came back home.
