[BACK]Return to MemoDB2ClassicNote.pl CVS log [TXT][DIR] Up to [local] / palm / MemoDB2ClassicNote

Diff for /palm/MemoDB2ClassicNote/MemoDB2ClassicNote.pl between version 1.1 and 1.4

version 1.1, 2010/03/09 20:44:39 version 1.4, 2010/03/10 18:50:31
Line 4 
Line 4 
 #         FILE:  MemoDB2ClassicNote.pl  #         FILE:  MemoDB2ClassicNote.pl
 #  #
 #        USAGE:  ./MemoDB2ClassicNote.pl <source> <dest>  #        USAGE:  ./MemoDB2ClassicNote.pl <source> <dest>
   #                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.  #  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  #       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$  #     REVISION:  $AFresh1: MemoDB2ClassicNote.pl,v 1.3 2010/03/09 21:29:46 andrew Exp $
 #===============================================================================  #===============================================================================
   
 use strict;  use strict;
Line 41 
Line 40 
     @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")'
Line 68 
Line 70 
         $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;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>