Skip to content

Commit

Permalink
Item9900: Add htmltotextCmd to configure so it can be tuned. Also imp…
Browse files Browse the repository at this point in the history
…roved help text. Not worth mentionning in the release notes, but worth releasing

git-svn-id: http://svn.foswiki.org/trunk/StringifierContrib@9975 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed Nov 12, 2010
1 parent b1005fa commit 0e82b35
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lib/Foswiki/Contrib/StringifierContrib.pm
Expand Up @@ -27,8 +27,8 @@ use File::stat;

use vars qw($VERSION $RELEASE $magic);

$VERSION = '$Rev: 4426 (2010-10-18) $';
$RELEASE = '1.12';
$VERSION = '$Rev: 9950 (2010-11-12) $';
$RELEASE = '1.13';
$magic = File::MMagic->new();

sub stringFor {
Expand Down
26 changes: 17 additions & 9 deletions lib/Foswiki/Contrib/StringifierContrib/Config.spec
Expand Up @@ -21,39 +21,47 @@ $Foswiki::cfg{StringifierContrib}{SkipTopics} = '';
$Foswiki::cfg{StringifierContrib}{WordIndexer} = 'antiword';

# **COMMAND**
# abiword command
# Path to your abiword command (used to convert MS word documents: .doc)
$Foswiki::cfg{StringifierContrib}{abiwordCmd} = 'abiword';

# **COMMAND**
# antiword command
# Path to your antiword command (used to convert MS word documents: .doc)<br />
# On a hosted server, you might need to tell antiword where to look for
# its mapping files using some environment directives:<br />
# <code>/usr/bin/env ANTIWORDHOME=/home2/mydomain/.antiword /home2/mydomain/bin/antiword</code>
$Foswiki::cfg{StringifierContrib}{antiwordCmd} = 'antiword';

# **COMMAND**
# wvHtml command
# Path to your wvHtml command (used to convert MS word documents: .doc)
$Foswiki::cfg{StringifierContrib}{wvHtmlCmd} = 'wvHtml';

# **COMMAND**
# ppthtml command
# Path to your ppthtml command (used to convert MS powerpoint documents: .ppt)
$Foswiki::cfg{StringifierContrib}{ppthtmlCmd} = 'ppthtml';

# **COMMAND**
# pdftotext command
# Command used to convert HTML to text, also output of commands which output HTML, such as the ones above.<br />
# Usually html2text from <a href="http://www.mbayer.de/html2text/">http://www.mbayer.de/html2text/</a>
$Foswiki::cfg{StringifierContrib}{htmltotextCmd} = 'html2text';

# **COMMAND**
# Path to your pdftotext command (used to convert PDF files)
$Foswiki::cfg{StringifierContrib}{pdftotextCmd} = 'pdftotext';

# **COMMAND**
# pptx2txt.pl command
# Path to your pptx2txt.pl command (used to convert MS powerpoint recent documents: .pptx)
$Foswiki::cfg{StringifierContrib}{pptx2txtCmd} = '../tools/pptx2txt.pl';

# **COMMAND**
# docx2txt.pl command
# Path to your docx2txt.pl command (used to convert MS word recent documents: .docx)
$Foswiki::cfg{StringifierContrib}{docx2txtCmd} = '../tools/docx2txt.pl';

# **COMMAND**
# xlsx2txt.pl command
# Path to your xlsx2txt.pl command (used to convert MS excel recent documents: .xlsx)
$Foswiki::cfg{StringifierContrib}{xls2txtCmd} = '../tools/xls2txt.pl';

# **BOOLEAN**
# Debug setting
$Foswiki::cfg{StringifierContrib}{Debug} = '0';
$Foswiki::cfg{StringifierContrib}{Debug} = 0;

1;
2 changes: 1 addition & 1 deletion lib/Foswiki/Contrib/StringifierContrib/Plugins/HTML.pm
Expand Up @@ -17,7 +17,7 @@ package Foswiki::Contrib::StringifierContrib::Plugins::HTML;
use Foswiki::Contrib::StringifierContrib::Base;
our @ISA = qw( Foswiki::Contrib::StringifierContrib::Base );

my $html2text = $Foswiki::cfg{StringifierContrib}{html2text} || 'html2text';
my $html2text = $Foswiki::cfg{StringifierContrib}{htmltotextCmd} || 'html2text';

__PACKAGE__->register_handler("text/html", ".html");

Expand Down

0 comments on commit 0e82b35

Please sign in to comment.