source: trunk/gsdl/perllib/plugins/RTFPlug.pm@ 2564

Last change on this file since 2564 was 2564, checked in by jrm21, 23 years ago

Added RTFPlug. (It's the smallest one so far - 1511 bytes - yay!)

HTMLPlug no longer blocks .rtf files by default.
PDFPlug shouldn't have had the same block_exp as HTMLPlug anyway...

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1###########################################################################
2#
3# RTFPlug.pm -- plugin for importing Rich Text Format files.
4#
5# A component of the Greenstone digital library software
6# from the New Zealand Digital Library Project at the
7# University of Waikato, New Zealand.
8#
9# Copyright (C) 2001 New Zealand Digital Library Project
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26
27package RTFPlug;
28
29use ConvertToPlug;
30
31sub BEGIN {
32 @ISA = ('ConvertToPlug');
33}
34
35use strict;
36
37sub get_default_process_exp {
38 my $self = shift (@_);
39 return q^(?i)\.rtf$^;
40}
41
42sub process {
43 my $self = shift (@_);
44 print STDERR "RTFPlug: passing $_[3] onto $self->{'convert_to'} Plug\n"
45 if $self->{'verbosity'} > 1;
46 return ConvertToPlug::process_type($self,"rtf",@_);
47}
48
491;
Note: See TracBrowser for help on using the repository browser.