NAME
CSV::Processor - Set of different methods that adds new columns in csv files
VERSION
version 1.01
SYNOPSIS
use
CSV::Processor;
my
$bot
= CSV::Processor->new(
file
=>
'test.csv'
,
has_column_names
=> 1 );
$bot
->add_email(5, 6,
%params
);
# 5 and 6 are column numbers where input and output data located
$bot
->add_email(
'URL'
,
'EMAIL'
);
# 'URL' 'EMAIL' are field names where data will be stored
DESCRIPTION
Set of ready-to-use useful csv file processors based on Text::AutoCSV and other third-party modules
E.g. from the box you can add email by url using Email::Extractor
Pull requests are welcome ;)
Also this module includes command line utilitie, csvprocess and csvjoin
AUTHORS
Pavel Serkov <pavelsr@cpan.org>
new
Constructor
parameters
C<file>
C<encoding>
C<column_names>
C<human_numbering>
C<eol>
C<sep_char>
C<prefix>
C<verbose>
rw_wrapper
Wrapper under "set_walker_ar" in Text::AutoCSV / "field_add_computed" in Text::AutoCSV. Helper for easy implementing new processor
$self
->rw_wrapper(
$in_field
,
$out_field
,
sub
{
my
$in_field_value
=
shift
;
return
do_some(
$in_field_value
);
},
%params
);
add_email
Try to extract email by website column using "search_until_attempts" in Email::Extractor (wrapper for this method)
$bot
->add_email(5);
$bot
->add_email(5, 6);
$bot
->add_email(
'URL'
);
$bot
->add_email(
'URL'
,
'EMAIL'
);
$bot
->add_email(
'URL'
,
'EMAIL'
,
attempts
=> 5,
human_numbering
=> 1);
add_same
$bot
->add_same(
$in_column
,
$out_column
,
value
=>
$f
);
Add same value to each row. Value is specified in value
param
AUTHOR
Pavel Serikov <pavelsr@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 by Pavel Serikov.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.