QBCPS Banner
 

Dispatches from the Co-Prosperity Sphere

We are not defined by the products we buy, the cars we drive, the books we read or the movies we watch. We are more than consumers. We are producers, and we believe that every new skill we acquire makes our lives and our world a little bit better.

8.07.2006

Amazing Data

Aoibheall and I are perennially trying to get the house organized. Thermodynamics is against us, but we still put up shelves and file papers away. One thing that's been on our minds recently is our freezers. We have two - one in the kitchen, next to the fridge, and a deep freeze downstairs in the basement. The deep freeze is currently full of frozen chickens and some other things which we won't know about or get to until after the chickens are out of the way. (Subject of another post: how many freezers do we really need? Some say three, others five...)

I looked around and it seems that Knowing What Is in the Freezer is a problem that lots of people have, and they all solve it the same way: they stick a piece of paper on the freezer door along with a pencil on a string and they log stuff in and out. Now, low tech is good. Low tech tends to work during a blackout, and that's increasingly comforting. However, it's inconvenient. I am almost never standing in the basement when I'm wondering what's in the freezer (and whether we need to buy a whatever-it-may-be on this trip to the store). And I am never standing next to both freezers while I am thinking about the week's menu.

What I want is to have some kind of centralized inventory system. Maybe we print barcodes on Avery(tm) labels and stick 'em on the freezer bags as we put things in. "2 quarts of blackberries - ID 245612154334" Then when we pull things out of the freezer we scan 'em and say, "Removed!"

This system ought to be able to attach expiration dates to things. "Hmm...look here, do you really want to use figs that have been in the deep freeze for two years?"

The best would be if the inventory were on some kind of web server so that from any of our computers we could see it. It would make assembling the grocery list much easier. Heck, get a few scanners and we could extend the system to track the pantry and the fridge and the spice cupboard and the ingredients cupboard and...

So with this on my mind, I read yesterday about an application for Mac OS X called Delicious Library. I downloaded the demo just to try it out. It doesn't do the kind of inventory I'd been thinking about, but the technology seemed cool. Instead of needing a barcode scanner, it can use the little camera built in to my MacBook (or any external webcam) to scan barcodes. It integrates with Amazon.com to look up movies, albums, and books. It will even offer to sell stuff for you. Within five minutes of playing with it, I was sold. Bought the software and went to work on the CD shelves.

Aoibheall and I are looking forward to being able to say to the girls, "Oh, you're working on a report on whatever-it-is? We have three books about that, look on the second shelf in the living room..."

Delicious Library. Dang, that's good software. Now if only you could publish the inventory as a web page...

2 Comments:

Blogger Mortaine said...

You can publish as a web page using one of the library export programs (or grow your own-- the library is an XML file). However, I can't get any of the exporters to work on my own system. Your mileage will almost certainly vary.

11:37 AM  
Blogger PirateGuillermo said...

It's true that the library is an XML file. Rather than have the nightmare of actually parsing XML (life is too short to do that unless I'm getting paid) I hacked together a Perl script to deal with the export file format (tab delimited, first row lists column names). Extending this should be trivial, including adding CSS and putting it in a nicer template. All of this is necessary because the site that hosts Delicious Exporter is not responding today. Bleh.

#!/usr/bin/perl -w

use strict;

my $KEY_TITLE='title';

sub printHeader() {

print <<EOFH
<html>
<head>
<title>Delicious Library</title>
</head>
<body>
<table>
<tr><th>Title</th></tr>
EOFH
}

sub printFooter() {
print <<EOFF
</table>
</body>
</html>
EOFF
}

sub printLine() {
my $lineHashRef = shift;

print <<EOFL
<tr><td>$lineHashRef->{$KEY_TITLE}</td></tr>
EOFL
}

&printHeader();
my %lineHash = ();
my $linecount = 0;
while(<>) {
my @lineElems=split('\t');
$lineHash{$KEY_TITLE} = $lineElems[10];
if (++$linecount > 1) {
&printLine(\%lineHash);
}
}
&printFooter();

4:40 PM  

Post a Comment

<< Home