1#!/usr/bin/perl
2##---------------------------------------------------------------------------##
3##  File:
4##	$Id: mha-dbedit,v 1.8 2003/07/20 03:24:38 ehood Exp $
5##  Author:
6##      Earl Hood       mhonarc@mhonarc.org
7##  Description:
8##      Program to modify database w/o editing archive files.
9##---------------------------------------------------------------------------##
10##    MHonArc -- Internet mail-to-HTML converter
11##    Copyright (C) 1998-1999	Earl Hood, mhonarc@mhonarc.org
12##
13##    This program is free software; you can redistribute it and/or modify
14##    it under the terms of the GNU General Public License as published by
15##    the Free Software Foundation; either version 2 of the License, or
16##    (at your option) any later version.
17##
18##    This program is distributed in the hope that it will be useful,
19##    but WITHOUT ANY WARRANTY; without even the implied warranty of
20##    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21##    GNU General Public License for more details.
22##
23##    You should have received a copy of the GNU General Public License
24##    along with this program; if not, write to the Free Software
25##    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26##    02111-1307, USA
27##---------------------------------------------------------------------------##
28
29package mha_dbedit;
30
31##---------------------------------------------------------------------------##
32##				Main routine				     ##
33##---------------------------------------------------------------------------##
34
35MAIN: {
36    unshift(@INC, 'lib');    # Should I leave this line in?
37
38    ## Initialize MHonArc
39    require 'mhamain.pl' || die qq/ERROR: Unable to require "mhamain.pl"\n/;
40    mhonarc::initialize();
41
42    ## Open archive
43    unshift(@ARGV, '-readdb', '-lock');
44    if (!mhonarc::open_archive()) {
45        die "ERROR: Unable to open archive\n";
46    }
47
48    ## Write database
49    print STDOUT "\nWriting database ...\n" unless $mhonarc::QUIET;
50    my $status = mhonarc::output_db($mhonarc::DBPathName);
51    mhonarc::close_archive();
52    exit($status ? 0 : 1);
53}
54
55##---------------------------------------------------------------------------##
561;
57
58__END__
59
60=head1 NAME
61
62mha-dbedit - make database edits to a MHonArc archive
63
64=head1 SYNOPSIS
65
66S<B<mha-dbedit> [I<options>]>
67
68=head1 DESCRIPTION
69
70B<mha-dbedit> is a utility program that is part of the B<MHonArc>
71software package.  The program allows archive database edits to be
72made without causing HTML pages to be touched.
73
74The documentation for B<MHonArc> is distributed in HTML format.
75Due to its size and organization, it is not suited for manpage
76format.  Consult your system administrator for where the documentation
77has been installed, or see L<"AVAILABILITY"> on where you can
78access the documentation on the web.
79
80=head1 EXAMPLE
81
82Typical usage:
83
84  shell> mha-dbedit -rcfile res.mrc -outdir /path/to/archive
85
86=head1 AVAILABILITY
87
88E<lt>I<http://www.mhonarc.org/>E<gt>
89
90=head1 AUTHOR
91
92Earl Hood, mhonarc@mhonarc.org
93
94MHonArc comes with ABSOLUTELY NO WARRANTY and MHonArc may be copied only
95under the terms of the GNU General Public License, which may be found in
96the MHonArc distribution.
97
98=cut
99
100