Foomatic SQLite Progress as of November 22nd

As of today, November 22nd, Foomatic can operate from a sqlite DB. On the Foomatic side this required only two lines of code.

my $dbfile = "$libdir/db/openprinting.db";
$this->{'dbh'} = DBI->connect("dbi:SQLite:dbname=$dbfile","","");

Foomatic will only use SQLite if there is not a mySQL credentials file yet is a SQLite DB. To make my SQLite copy of the DB I exported it from mySQL. The mySQL db was created using a php script written for openprint.org. Since XML -> mySQL -> SQLite is a most impractical build process my next task is to write what ever is needed to go XML -> SQLite.

When I was first consulting Till about what I needed to do there was the general assumption that I would be expending DB.pm with this importation functionality. Yet when I sat down to plan my approach I designed an external script. When I mentioned this to Till he reiterated about including everything in DB.pm. A bit of a facepalm moment since his point is so logical. DB.pm already has quite a bit of the functionality I need. So far I have only taken a cursory glance at what DB.pm has to offer. I know that there is functions in there I can use but I will have to take pen and paper and figure out what exactly I’ll use and what I need to write.

Leave a Reply

Your email address will not be published.