hash2fv - convert a hash db file into Tie::FieldVals data.
This describes version 0.6203 of hash2fv.
hash2fv --help | --manpage | --version
hash2fv {--fields fieldname } hashdbfile [ outfile ]
This script converts a hash db file (of the type used by AutomatedArchive 3.x) into Tie::FieldVals data.
This requires the file name of the hash db file, not just the location of the AutomatedArchive directory, so as to make this more flexible in the files it is able to read. While the AutomatedArchive file is usually "archive_dir/cgi-bin/files/ARCHIVE_DB.pl", someone converting it may wish to move it to a different location, or download it from their website, or may wish to use this script for converting files of the same format which aren't actually AutomatedArchive files.
If you want to define the order of the Fields in the output file, or simply define the legal fields you are interested in, then use this option to override the default of getting the Field names from the first record in the the Hash DB file.
Repeat the --fields option for each field name. Be sure to give every field you want, because this replaces the field definitions from the Hash DB file.
--fields Author --fields Category --fields Title --fields Location ...
Print help message and exit.
Print the full help documentation (manual page) and exit.
Print informational messages.
Print version information and exit.
The format of the input hash DB file is as follows:
%FILES = ( 1 => { Field => 'Value', AnotherField => 'AnotherValue', ... }, 2 => { ... }, ... ); 1;
This is the format used by the AutomatedArchive suite version 3.x. This may be the format used by version 2.x also.
This converter ignores the values of the '1', '2' (and so on) keys, just converting the Fields and Values into records.
The output data file is in the form of Field:Value pairs, with each record separated by a line with '=' on it.
See "FILE FORMAT" in Tie::FieldVals for more information.
Getopt::Long Pod::Usage Getopt::ArgvFile Data::Dumper File::Basename Tie::FieldVals::Row
perl(1) Getopt::Long Getopt::ArgvFile Pod::Usage
Please report any bugs or feature requests to the author.
Kathryn Andersen (RUBYKAT) perlkat AT katspace dot com http://www.katspace.com
Copyright (c) 2004 by Kathryn Andersen
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Tie::FieldVals, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::FieldVals
CPAN shell
perl -MCPAN -e shell install Tie::FieldVals
For more information on module installation, please visit the detailed CPAN module installation guide.