{
    use esmith::DB::db;

    my $dbpath = "/home/e-smith/cups/db";
    my $db = esmith::DB::db->open_ro($dbpath) or
        die "Could not open database $dbpath";
    foreach ($db->get_all_by_prop(type => 'printer')) {
        my $printer = $_->key;
        $OUT .= "\n";
        $OUT .= "$printer:\\\n";
        $OUT .= "\t:op=daemon:\\\n";
        if (-f "/etc/cups/ppd/$printer.ppd") {
            $OUT .= "\t:pd=/etc/cups/ppd/$printer.ppd:\\\n";
        }
        $OUT .= "\t:pr=|/usr/bin/lp -d $printer:\n";
    }
}
