/usr/bin/text2odf is in libopenoffice-oodoc-perl 2.125-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #!/usr/bin/perl -w
eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
if 0; # not running under some shell
#-----------------------------------------------------------------------------
# $Id : text2odf 0.2 2008-05-04 JMG$
#-----------------------------------------------------------------------------
=head1 NAME
text2odf - Text to OpenDocument conversion
=head1 SYNOPSIS
cat sourcefile.txt | text2odf targetfile.odt
=head1 DESCRIPTION
This filter creates an OpenDocument (ODF) file and fills it
with the text coming through the standard entry. The target file is
created, and any existing file with the same name is replaced.
To avoid this behaviour and append the text to an existing ODF file,
just remove the create => 'text' option in the script.
=cut
use OpenOffice::OODoc 2.101;
die "Missing target filename\n" unless $ARGV[0];
my $doc = odfDocument(file => $ARGV[0], create => 'text');
while (my $line = <STDIN>)
{
$doc->appendParagraph(text => $line);
}
$doc->save;
exit;
|