The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Palm::Progect::Converter::CSV - Convert between Progect databases and CSV files

SYNOPSIS

    my $converter = Palm::Progect::Converter->new(
        format => 'CSV',
        # ... other args ...
    );

    $converter->load_records();

    # ... do stuff with records

    $converter->save_records();

DESCRIPTION

This converts between CSV files and Palm::Progect records and preferences.

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.

The columns in the format are:

level

The indent level of the record.

description
priority

The priority of the record from 1 to 5, or 0 for no priority.

isAction
isProgress
isNumeric
isInfo

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

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

The numerator of a numeric record. If the numeric value of a record is 4/5, then the numericActual value is 4.

numericLimit

The denominator of a numeric record. If the numeric value of a record is 4/5, then the numericLimit value is 5.

DateDue

This is a date in the format specified on the command line with the --csv-date-format option

category
opened
description
note

OPTIONS

These options can be passed to the Palm::Progect::Converter constructor, for instance:

    my $converter = Palm::Progect::Converter->new(
        format       => 'CSV',
        use_unix_eol => 1,
    );
separator

Use the given character as the csv separator (defaults to ;)

use_pc_eol

If true, use \r\n as the csv line terminator (the default)

use_unix_eol

If true, use \n as the csv line terminator

use_mac_eol

If true, use \r the csv line terminator

date_format

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:

    my $converter = Palm::Progect::Converter->new(
        format      => 'CSV',
        date_format => 'mm-dd-yy',
    );
quote_char

Use the given character as the csv quote char (defaults to ")

METHODS

load_records($file, $append)

Load CSV records from $file, translating them into the internal Palm::Progect::Record format.

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.

save_records($file, $append)

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.

AUTHOR

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/

SEE ALSO

progconv

Palm::PDB(3)

http://progect.sourceforge.net/