Palm::Progect::Converter::CSV - Convert between Progect databases and CSV files
my $converter = Palm::Progect::Converter->new( format => 'CSV', # ... other args ... ); $converter->load_records(); # ... do stuff with records $converter->save_records();
This converts between CSV files and Palm::Progect records and preferences.
Palm::Progect
The CSV format allows for basic import/export with spreadsheet programs. The CSV file does not look like a tree structure; instead, there is a level column, which indicates the indent level for the current row.
level
The columns in the format are:
The indent level of the record.
The priority of the record from 1 to 5, or 0 for no priority.
Any record can have one (and only one) of the above types.
If you are going to change the type of a record, remember to set all the other types to false:
isAction isProgress isNumeric isInfo 0 0 0 1
Completed has different values depending upon the type of record. For action items, it is either 1 or 0, for complete or not complete.
For Progress items, it is a number between 1 and 100, indicating a percentage.
For Numeric items it is a number between 1 and 100 indicating the the integer percentage of the numericActual value divided by the numericLimit value.
numericActual
numericLimit
The numerator of a numeric record. If the numeric value of a record is 4/5, then the numericActual value is 4.
4/5
4
The denominator of a numeric record. If the numeric value of a record is 4/5, then the numericLimit value is 5.
5
This is a date in the format specified on the command line with the --csv-date-format option
--csv-date-format
These options can be passed to the Palm::Progect::Converter constructor, for instance:
Palm::Progect::Converter
my $converter = Palm::Progect::Converter->new( format => 'CSV', use_unix_eol => 1, );
Use the given character as the csv separator (defaults to ;)
If true, use \r\n as the csv line terminator (the default)
If true, use \n as the csv line terminator
If true, use \r the csv line terminator
The format for dates: Any combination of dd, mm, yy, yyyy (default is dd/mm/yy).
Any dates that are printed will use this format. Dates that are parsed will be expected to be in this format.
Note that even though the command-line option is called csv-date-format, when passed to Palm::Progect::Converter, the option is called date_format:
csv-date-format
date_format
my $converter = Palm::Progect::Converter->new( format => 'CSV', date_format => 'mm-dd-yy', );
Use the given character as the csv quote char (defaults to ")
Load CSV records from $file, translating them into the internal Palm::Progect::Record format.
$file
Palm::Progect::Record
If $append is true then load_records will append the records imported from $file to the internal records list. If false, load_records will replace the internal records list with the records imported from $file.
$append
load_records
Export records in CSV format to $file.
If $append is true then load_records will append the CSV lines to file. If false, export_records If false, export_records will overwrite $file (if it exists) before writing the lines.
file
export_records
Michael Graham <mag-perl@occamstoothbrush.com>
Copyright (C) 2002-2005 Michael Graham. All rights reserved. This program is free software. You can use, modify, and distribute it under the same terms as Perl itself.
The latest version of this module can be found on http://www.occamstoothbrush.com/perl/
progconv
Palm::PDB(3)
http://progect.sourceforge.net/
To install Palm::Progect, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Palm::Progect
CPAN shell
perl -MCPAN -e shell install Palm::Progect
For more information on module installation, please visit the detailed CPAN module installation guide.