I've been toying with P5::Palm for a while (even posted a few, broken scripts here)... The trick is to read the StdAppInfo POD properly... It contains stuff like ID number, category etc. If you want your data to be handled as Palm data, I suggest you look into that.
Data::Dumper helped me to understand how exactly the Palm data structure was used by
p5::Palm.
#!/usr/bin/perl
use strict;
use Palm::Memo;
use Data::Dumper;
open(FOO,">foo");
my $pdb = Palm::Memo->new();
$pdb->Load("MemoDB.pdb");
#Load a memo
print FOO Dumper $pdb;
#Dump the entire structure into a file
close(FOO);
I've been working on a similar project for some time now... I currently have my Datebook, Addressbook, Memos and Todo list online... I'll release it thru
Sourceforge in the near future. If you want a link or a lookie at some code, lemme know.
Update:This is some basic data adding code for Palm::Memo (part of
p5::Palm)
#!/usr/bin/perl
use strict;
use Palm::Memo;
my $pdb = Palm::Memo->new();
$pdb->Load("MemoDB.pdb");
my $record = $pdb->new_Record;
$record->{data} = "Foo\nBar\nBaz";
$record->{id} = int rand 65535;
$pdb->append_Record($record);
$pdb->Write("MemoDB.pdb");
#Warning: The original MemoDB will be overwritten here
#I tested this on POSE, since my Palm was out of reach :)
Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.