version 1.2, 2010/03/09 20:55:05 |
version 1.4, 2010/03/10 18:50:31 |
|
|
# x:\.app-storage\file_.media.cryptofs.apps.usr.palm.applications.com.littlestick.classicnote_0\ |
# x:\.app-storage\file_.media.cryptofs.apps.usr.palm.applications.com.littlestick.classicnote_0\ |
# |
# |
# DESCRIPTION: converts a Palm MemoDB.pdb to ClassicNote format. |
# DESCRIPTION: converts a Palm MemoDB.pdb to ClassicNote format. |
|
# http://www.precentral.net/homebrew-apps/classicnote |
# |
# |
# AUTHOR: Andrew Fresh (AAF), andrew@afresh1.com |
# AUTHOR: Andrew Fresh (AAF), andrew@afresh1.com |
# COMPANY: Red River Communications |
# COMPANY: Red River Communications |
# VERSION: 1.0 |
# VERSION: 1.0 |
# CREATED: 03/09/10 11:22:52 |
# CREATED: 03/09/10 11:22:52 |
# REVISION: $AFresh1: MemoDB2ClassicNote.pl,v 1.1 2010/03/09 20:44:39 andrew Exp $ |
# REVISION: $AFresh1: MemoDB2ClassicNote.pl,v 1.3 2010/03/09 21:29:46 andrew Exp $ |
#=============================================================================== |
#=============================================================================== |
|
|
use strict; |
use strict; |
|
|
@categories = ('undefined'); |
@categories = ('undefined'); |
} |
} |
|
|
|
my $count = 0; |
my $cat_sth = $dbh->prepare( |
my $cat_sth = $dbh->prepare( |
'INSERT INTO categories ("cat_id", "category") VALUES (?,?)'); |
'INSERT INTO categories ("cat_id", "category") VALUES (?,?)'); |
foreach my $id ( 0 .. @categories ) { |
foreach my $id ( 0 .. @categories ) { |
my $name = $categories[$id]->{name}; |
my $name = $categories[$id]->{name}; |
next if !$name; |
next if !$name; |
|
|
print "Category: $id $name\n"; |
$count++; |
|
print "Category [$count]: $id $name\n"; |
$cat_sth->execute( $id, $name ) or die $cat_sth->errstr; |
$cat_sth->execute( $id, $name ) or die $cat_sth->errstr; |
} |
} |
|
|
|
$count = 0; |
my $rec_sth |
my $rec_sth |
= $dbh->prepare( 'INSERT INTO' |
= $dbh->prepare( 'INSERT INTO' |
. ' memos ("cat_id", "head", "memo", "privat")' |
. ' memos ("cat_id", "head", "memo", "privat")' |
|
|
$private = 1; |
$private = 1; |
} |
} |
|
|
print "Record: $head\n"; |
$count++; |
|
print "Record [$count]: $head\n"; |
|
|
$rec_sth->execute( $record->{category}, $head, $data, $private ) |
$rec_sth->execute( $record->{category}, $head, $data, $private ) |
or die $cat_sth->errstr; |
or die $cat_sth->errstr; |