=================================================================== RCS file: /cvs/palm/MemoDB2ClassicNote/MemoDB2ClassicNote.pl,v retrieving revision 1.1 retrieving revision 1.4 diff -u -r1.1 -r1.4 --- palm/MemoDB2ClassicNote/MemoDB2ClassicNote.pl 2010/03/09 20:44:39 1.1 +++ palm/MemoDB2ClassicNote/MemoDB2ClassicNote.pl 2010/03/10 18:50:31 1.4 @@ -4,18 +4,17 @@ # FILE: MemoDB2ClassicNote.pl # # USAGE: ./MemoDB2ClassicNote.pl +# dest is the db file in +# x:\.app-storage\file_.media.cryptofs.apps.usr.palm.applications.com.littlestick.classicnote_0\ # # DESCRIPTION: converts a Palm MemoDB.pdb to ClassicNote format. +# http://www.precentral.net/homebrew-apps/classicnote # -# OPTIONS: --- -# REQUIREMENTS: --- -# BUGS: --- -# NOTES: --- # AUTHOR: Andrew Fresh (AAF), andrew@afresh1.com # COMPANY: Red River Communications # VERSION: 1.0 # CREATED: 03/09/10 11:22:52 -# REVISION: $AFresh1$ +# REVISION: $AFresh1: MemoDB2ClassicNote.pl,v 1.3 2010/03/09 21:29:46 andrew Exp $ #=============================================================================== use strict; @@ -41,16 +40,19 @@ @categories = ('undefined'); } +my $count = 0; my $cat_sth = $dbh->prepare( 'INSERT INTO categories ("cat_id", "category") VALUES (?,?)'); foreach my $id ( 0 .. @categories ) { my $name = $categories[$id]->{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; } +$count = 0; my $rec_sth = $dbh->prepare( 'INSERT INTO' . ' memos ("cat_id", "head", "memo", "privat")' @@ -68,7 +70,8 @@ $private = 1; } - print "Record: $head\n"; + $count++; + print "Record [$count]: $head\n"; $rec_sth->execute( $record->{category}, $head, $data, $private ) or die $cat_sth->errstr;