Acme::PIA::Export - Export contacts, calendars or todos from Arcor's PIA messaging
This module is intended to help export data from the PIA messaging web application that comes with the free Arcor mail account at www.arcor.de
It lets the user retrieve his data in CSV or XLS (not yet implemented) format or as hashes.
If you don't know what PIA is, you will most probably not need this module.
use Acme::PIA::Export; my $pia = Acme::PIA::Export->new( "username" => "mylogin", "password" => "verysecret" ); $pia->export( "contacts" ); foreach my $contact ( $pia->entries() ) { print "$contact->{NAME}, $contact->{VORNAME}\n"; } $pia->export_csv( file => "C:/my/piacontacts.csv" );
Creates and returns a new Acme::PIA::Export object.
Parameters are given as key => value pairs. The most commonly used are "username" and "password". If you expirience problems you can also give the parameter "DEBUG" => 1 to get verbose output from all functions.
Export all objects for the given scope (contacts, calendar etc.) and stores them in the Acme::PIA::Export object.
ATTENTION: Only "contacts" scope is implemented up to now! Look out for future releases.
Retrieve a list with all entries as hashes.
Retrieve entries in csv format. Without arguments they are returned as a list of lines, including column headers as first row. The column headers can be turned off by setting the option 'headers => 0'.
If the parameter 'file => "/path/to/file.csv"' is given, then the output is saved to the given file directly and the number of rows written (excluding the column headers) is returned.
TODO: In future releases, there will be the option to pass along a "fields" paramter as a reference to an array that holds the names of the columns to be exported.
Retrieve entries in xls format.
The parameter 'file => "/path/to/file.xls"' is mandatory. The output is saved to the given file directly and the number of rows written (excluding the column headers) is returned.
The column headers can be turned off by setting the option 'headers => 0'.
Retrieve a list with all the column names. If you already did an export(), you can call fields() without parameters to get the column names for the type of the last export. Otherwise, pass the name of the scope as a string.
You can rely on that the order of column names is the same as the field order returned by the entries_XXX methods.
Christian Winter <chrwin@cpan.org>
This peace of code is licensed under the same terms as Perl itself. You should have received a copy of this license together with your Perl version. You can read it at http://www.perl.org or by typing "perldoc perlartistic" or "perldoc perlgpl"
Please report those to the author.
To install Acme::PIA::Export, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::PIA::Export
CPAN shell
perl -MCPAN -e shell install Acme::PIA::Export
For more information on module installation, please visit the detailed CPAN module installation guide.