Skip to content

Instantly share code, notes, and snippets.

@soh-i
Created August 13, 2012 10:40
Show Gist options
  • Select an option

  • Save soh-i/3339265 to your computer and use it in GitHub Desktop.

Select an option

Save soh-i/3339265 to your computer and use it in GitHub Desktop.
Kobito.appで管理されてるDBを取り出す
#!/usr/bin/env perl
use strict;
use warnings;
use DBIx::Simple;
my $db = DBIx::Simple->connect('dbi:SQLite:dbname=./Kobito.db') || die DBIx::Simple->error;
my $result = $db->query('select ZCREATED_AT, ZTITLE, ZRAW_BODY, ZBODY from ZITEM') || die $db->error;
while ($result->into( my($CREATED_AT, $TITLE, $ROW_BODY, $HTML) )) {
print "$CREATED_AT\t";
print "$TITLE\n";
}
$db->disconnect;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment