Text::vCard::Addressbook man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Text::vCard::AddressboUser)Contributed Perl DocumenText::vCard::Addressbook(3)

NAME
       Text::vCard::Addressbook - a package to parse, edit and create multiple
       vCards (RFC 2426)

SYNOPSIS
	 use Text::vCard::Addressbook;

	 my $address_book = Text::vCard::Addressbook->new({
	       'source_file' => '/path/to/address.vcf',
	 });

	 foreach my $vcard ($address_book->vcards()) {
	       print "Got card for " . $vcard->fullname() . "\n";
	 }

DESCRIPTION
       This package provides an API to reading / editing and creating multiple
       vCards. A vCard is an electronic business card. This package has been
       developed based on rfc2426.

       You will find that many applications (Apple Address book, MS Outlook,
       Evolution etc) can export and import vCards.

READING IN VCARDS
   load()
	 use Text::vCard::Addressbook;

	 # Read in from a list of files
	 my $address_book = Text::vCard::Addressbook->load( ['foo.vCard', 'Addresses.vcf']);

       This method will croak if it is unable to read in any of the files.

   import_data()
	 $address_book->import_data($value);

       This method imports data directly from a string.

   new()
	 # Read in from just one file
	 my $address_book = Text::vCard::Addressbook->new({
	       'source_file' => '/path/to/address.vcf',
	 });

       This method will croak if it is unable to read in the source_file.

	 # File already in a string
	 my $address_book = Text::vCard::Addressbook->new({
	       'source_text' => $source_text,
	 });

	 # Create a new address book
	 my $address_book = Text::vCard::Addressbook->new();

       Looping through all vcards in an address book.

	 foreach my $vcard ($address_book->vcards()) {
	       $vcard->...;
	 }

METHODS
   add_vcard()
	 my $vcard = $address_book->add_vcard();

       This method creates a new empty Text::vCard object, stores it in the
       address book and return it so you can add data to it.

   vcards()
	 my $vcards = $address_book->vcards();
	 my @vcards = $address_book->vcards();

       This method returns a reference to an array or an array of vcards in
       this address book. This could be an empty list if there are no entries
       in the address book.

   export()
	 my $vcf_file = $address_book->export()

       This method returns the vcard data in the vcf file format.

       Please note there is no validation, you must ensure that the correct
       nodes (FN,N,VERSION) are already added to each vcard if you want to
       comply with RFC 2426.

       This might not escape the results correctly at the moment.

AUTHOR
       Leo Lapworth, LLAP@cuckoo.org

COPYRIGHT
       Copyright (c) 2003 Leo Lapworth. All rights reserved.  This program is
       free software; you can redistribute it and/or modify it under the same
       terms as Perl itself.

ACKNOWLEDGEMENTS
       The authors of Text::vFile::asData for making my life so much easier.

SEE ALSO
       Text::vCard, Text::vCard::Node

perl v5.14.1			  2010-01-24	   Text::vCard::Addressbook(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net