The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

hash2fv - convert a hash db file into Tie::FieldVals data.

VERSION

This describes version 0.6203 of hash2fv.

SYNOPSIS

hash2fv --help | --manpage | --version

hash2fv {--fields fieldname } hashdbfile [ outfile ]

DESCRIPTION

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.

OPTIONS

--fields fieldname

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 ...
--help

Print help message and exit.

--manpage

Print the full help documentation (manual page) and exit.

--verbose

Print informational messages.

--version

Print version information and exit.

FILE FORMATS

Hash DB File Format

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.

FieldVals Format

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.

REQUIRES

    Getopt::Long
    Pod::Usage
    Getopt::ArgvFile
    Data::Dumper
    File::Basename
    Tie::FieldVals::Row

SEE ALSO

perl(1) Getopt::Long Getopt::ArgvFile Pod::Usage

BUGS

Please report any bugs or feature requests to the author.

AUTHOR

    Kathryn Andersen (RUBYKAT)
    perlkat AT katspace dot com
    http://www.katspace.com

COPYRIGHT AND LICENCE

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.