Net::Download::XMLScripted::XMLScripted - Perl XML scripted download program
use Net::Download::XMLScripted::XMLScripted; To Run from Command Line: (1) perl XMLScripted.pm -inXMLFileName xmlFileName [-verbose] (2) perl XMLScripted.pm -inXMLFileName xmlFileName -beginDate YYYY-MM-DD [-endDate YYYY-MM-DD] (3) perl XMLScripted.pm -generateSampleXMLFile sampleXMLFileName (4) perl XMLScripted.pm -showTranslationRules (5) perl XMLScripted.pm -version
This is a daily download program. The input is an XML file that has information about URLs that need to be downloaded. It uses specific translation rules to generate URL names that contain dates. It creates directories specified in the input XML file and downloads the URLs. This module is ideal for cron jobs.
None by default.
perl(1) LWP::UserAgent HTTP::Request HTTP::Response URI::Heuristic XML::Parser
Singh T. Junior, <tsingh@gmail.com<gt>
Copyright (C) 2006 by Singh T. Junior
All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
The function getTranslationRules() return a string that contains translation grammar.
The function createTranslationHash() generates the hash that contains the translation rules. It's input argument is an Epoch Time variable.
Example: $cio->createTranslationHash(time);
The function dowload() performs the download operations. This includes creation of required directories.
This function returns full Directory name given a main path and a subdirectory.
This function creates status report in the download directory.
The getOperatingSystem() function returns the type of Operating System.
This program prints the usage of mainXMLScripted.
Returns current version of the program.
Generates sample XML file that can be modified and used as input.
This routine is responsible for performing the actual task. It's arguments are input xmlFileName, beginDate, and endDate. The format of date is YYYY-MM-DD. Ex: runEngine("/tmp/input.xml", "2007-07-04", "2007-07-04");
This routine is called by the instance of the XMLScripted object and it runs the program.
# Create XMLScripted Object
my $cio = Net::Download::XMLScripted::XMLScripted::->new();
# Run it
$cio->run();
1 POD Error
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
=over without closing =back
To install Net::Download::XMLScripted::XMLScripted, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Download::XMLScripted::XMLScripted
CPAN shell
perl -MCPAN -e shell install Net::Download::XMLScripted::XMLScripted
For more information on module installation, please visit the detailed CPAN module installation guide.