10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Kobito.appのDBファイルの中身を見る

Last updated at Posted at 2012-08-13

Kobito.appはSQLiteのDBで管理されている($HOME/Library/Kobito/Kobito.db)
このKobito.dbに書いた記事、tag、日付などが入ってます。

access2Kobito.pl
#!/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;


=pod

Example:
366526282.454518	Hooo
366526950.474287	Hoge!
366529876.797163	てすと
...

=cut

Tips

 ZRAW_BODYにはmdファイル、ZBODYにはHTMLに変換されたデータが入っているので、好きに取り出すことができるし、バックアップに使うこともできる。
 あるいは、Kobito.appで管理し、共有したい記事はDropboxへ保存する、といった使い方も可能になる。

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?