Mailinglist Archive: opensuse-commit (1116 mails)

< Previous Next >
commit OpenOffice_org-converter for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Mon, 09 Feb 2009 17:57:06 +0100
  • Message-id: <20090209165707.14DCD678161@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package OpenOffice_org-converter for
openSUSE:Factory
checked in at Mon Feb 9 17:57:06 CET 2009.


--------
--- OpenOffice_org-converter/OpenOffice_org-converter.changes 2008-09-11
21:35:49.000000000 +0200
+++
/mounts/work_src_done/STABLE/OpenOffice_org-converter/OpenOffice_org-converter.changes
2009-02-09 17:38:36.000000000 +0100
@@ -1,0 +2,10 @@
+Mon Feb 9 16:53:11 CET 2009 - pmladek@xxxxxxx
+
+- defined filters for OOo-1.x file formats
+- defined filters for templates of the already supported formats
+- added check for already existing output file
+- added --force option
+- added manual page and better help
+- fixed to work with filenames with space
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
ooconvert.1

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ OpenOffice_org-converter.spec ++++++
--- /var/tmp/diff_new_pack.g21349/_old 2009-02-09 17:56:58.000000000 +0100
+++ /var/tmp/diff_new_pack.g21349/_new 2009-02-09 17:56:58.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package OpenOffice_org-converter (Version 3.0)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,7 +22,7 @@
%define ooo_basis_dir basis3.0
%define ooo_home ooo3
Version: 3.0
-Release: 1
+Release: 3
License: LGPL v2.1 or later
Group: Productivity/Office/Other
AutoReqProv: on
@@ -31,21 +31,22 @@
Url: http://www.artofsolving.com/files/DocumentConverter.py
Source0: DocumentConverter.py
Source1: ooconvert
+Source2: ooconvert.1
Patch0: DocumentConverter.py-more-types.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch

%description
This package includes a simple script ooconvert that can be used to
-convert documents between various formats on the commandline. It uses
+convert various document file formats on the commandline. It uses
OpenOffice.org that guarantees the quality and the variety of available
-document formats.
+document file formats.



%prep
%setup -c -T
-cp %{S:0} %{S:1} .
+cp %{S:0} %{S:1} %{S:2} .
%patch0

%build
@@ -53,8 +54,10 @@
%install
install -m 755 -d $RPM_BUILD_ROOT%_datadir/%ooo_home/%ooo_basis_dir/program
install -m 755 -d $RPM_BUILD_ROOT%_bindir
+install -m 755 -d $RPM_BUILD_ROOT%_mandir/man1
install -m 644 DocumentConverter.py
$RPM_BUILD_ROOT%_datadir/%ooo_home/%ooo_basis_dir/program
install -m 755 ooconvert $RPM_BUILD_ROOT%_bindir
+install -m 644 ooconvert.1 $RPM_BUILD_ROOT%_mandir/man1

%clean
rm -rf $RPM_BUILD_ROOT
@@ -66,7 +69,15 @@
%dir %_datadir/%ooo_home/%ooo_basis_dir/program
%_datadir/%ooo_home/%ooo_basis_dir/program/*
%_bindir/*
+%_mandir/man1/*

%changelog
+* Mon Feb 09 2009 pmladek@xxxxxxx
+- defined filters for OOo-1.x file formats
+- defined filters for templates of the already supported formats
+- added check for already existing output file
+- added --force option
+- added manual page and better help
+- fixed to work with filenames with space
* Thu Sep 11 2008 pmladek@xxxxxxx
- package created, version 3.0 (fate#304874)

++++++ DocumentConverter.py-more-types.diff ++++++
--- /var/tmp/diff_new_pack.g21349/_old 2009-02-09 17:56:58.000000000 +0100
+++ /var/tmp/diff_new_pack.g21349/_new 2009-02-09 17:56:58.000000000 +0100
@@ -1,21 +1,34 @@
---- DocumentConverter.py 2008-05-05 19:09:05.000000000 +0200
-+++ DocumentConverter.py.new 2008-09-11 16:07:53.000000000 +0200
-@@ -33,14 +33,18 @@ FILTER_MAP = {
- FAMILY_SPREADSHEET: "HTML (StarCalc)",
+--- DocumentConverter.py
++++ DocumentConverter.py
+@@ -34,13 +34,31 @@
FAMILY_PRESENTATION: "impress_html_Export"
},
-+ "sxw": { FAMILY_TEXT: "StarOffice XML (Writer)" },
"odt": { FAMILY_TEXT: "writer8" },
++ "ott": { FAMILY_TEXT: "writer8_template" },
++ "sxw": { FAMILY_TEXT: "StarOffice XML (Writer)" },
++ "stw": { FAMILY_TEXT: "writer_StarOffice_XML_Writer_Template" },
"doc": { FAMILY_TEXT: "MS Word 97" },
++ "dot": { FAMILY_TEXT: "MS Word 97 Vorlage" },
+ "docx": { FAMILY_TEXT: "MS Word 2007 XML" },
++ "dotx": { FAMILY_TEXT: "MS Word 2007 XML Template" },
"rtf": { FAMILY_TEXT: "Rich Text Format" },
"txt": { FAMILY_TEXT: "Text" },
"ods": { FAMILY_SPREADSHEET: "calc8" },
++ "ots": { FAMILY_SPREADSHEET: "calc8_template" },
++ "sxc": { FAMILY_SPREADSHEET: "StarOffice XML (Calc)" },
++ "stc": { FAMILY_SPREADSHEET: "calc_StarOffice_XML_Calc_Template" },
"xls": { FAMILY_SPREADSHEET: "MS Excel 97" },
++ "xlt": { FAMILY_SPREADSHEET: "MS Excel 97 Vorlage/Template" },
+ "xlsx": { FAMILY_SPREADSHEET: "MS Excel 2007 XML" },
++ "xltx": { FAMILY_SPREADSHEET: "Calc MS Excel 2007 XML Template" },
"odp": { FAMILY_PRESENTATION: "impress8" },
++ "otp": { FAMILY_PRESENTATION: "impress8_template" },
++ "sxi": { FAMILY_PRESENTATION: "StarOffice XML (Impress)" },
++ "sti": { FAMILY_PRESENTATION: "impress_StarOffice_XML_Impress_Template" },
"ppt": { FAMILY_PRESENTATION: "MS PowerPoint 97" },
++ "pot": { FAMILY_PRESENTATION: "MS PowerPoint 97 Vorlage" },
+ "pptx": { FAMILY_PRESENTATION: "Impress MS PowerPoint 2007 XML" },
++ "potx": { FAMILY_PRESENTATION: "Impress MS PowerPoint 2007 XML Template"
},
"swf": { FAMILY_PRESENTATION: "impress_flash_Export" }
}
# see http://wiki.services.openoffice.org/wiki/Framework/Article/Filter

++++++ ooconvert ++++++
--- /var/tmp/diff_new_pack.g21349/_old 2009-02-09 17:56:58.000000000 +0100
+++ /var/tmp/diff_new_pack.g21349/_new 2009-02-09 17:56:58.000000000 +0100
@@ -20,19 +20,64 @@
cat << EOF
Converts the input file to the output file using OpenOffice.org.

-Usage: ${0##*/} input output
+Usage: ${0##*/} [--help] [--force] input output
+
+Options:
+
+ input - input file
+ output - output file
+ --help - print this help and exit
+ --force - force an already existing output file to be replaced
+
+See "man ooconvert" for more details.
EOF
}

-if test -z "$1" -o "$1" = "--help" -o $# -gt 2 ; then
- usage && exit 1;
+OOCONV_INPUT=
+OOCONV_OUTPUT=
+OOCONV_FORCE=
+while test ${#} -gt 0 ; do
+ case "$1" in
+ "--help")
+ usage
+ exit 1
+ ;;
+ "--force")
+ OOCONV_FORCE=1
+ ;;
+ *)
+ if test -n "$OOCONV_OUTPUT" ; then
+ echo "Error: Too many argumetns!"
+ exit 1;
+ fi
+ if test -z "$OOCONV_INPUT" ; then
+ OOCONV_INPUT="$1"
+ else
+ OOCONV_OUTPUT="$1"
+ fi
+ ;;
+ esac
+ shift
+done
+
+if test -z "$OOCONV_INPUT" ; then
+ echo "Error: Input file is not defined."
+ exit 1;
+fi
+
+if test -z "$OOCONV_OUTPUT" ; then
+ echo "Error: Output file is not defined."
+ exit 1;
fi

-INPUT=$1
-OUTPUT=$2
+if test ! -f "$OOCONV_INPUT" ; then
+ echo "Error: The input file does not exist: $OOCONV_INPUT"
+ exit 1;
+fi

-if test ! -f $INPUT ; then
- echo "Error: INPUT file does not exist: $INPUT"
+if test -f "$OOCONV_OUTPUT" -a -z "$OOCONV_FORCE" ; then
+ echo "Error: The out file already exists: $OOCONV_INPUT"
+ echo "You might use the option \"--force\""
exit 1;
fi

@@ -69,7 +114,7 @@
# run the tests
echo "Doing the conversion..."
export PYTHONPATH="$ooo_home/basis-link/program"
-python $document_converter_py $INPUT $OUTPUT
+python $document_converter_py "$OOCONV_INPUT" "$OOCONV_OUTPUT"

# kill the OOo
killall soffice.bin

++++++ ooconvert.1 ++++++
.TH ooconvert "1" "2009-02-09" "OpenOffice.org Converter" "User Commands"
.SH "Name"
ooconvert \- Commandline Document Converter Using OpenOffice.org
.SH SYNOPSIS
.B ooconvert
[\fB\-\-help\fR] [\fB\-\-force\fR] \fIinput\fR \fIoutput\fR

.SH DESCRIPTION
This tool converts documents between various formats on the commandline.
It uses OpenOffice.org that guarantees the quality of available import
and export filters.

This tool tries to start OpenOffice.org in the server mode on backgroud.
It does not work if the OpenOffice.org application has already been
running. Also it slows down the conversion a lot. We hope to reduce these
limitations in the further versions.


.SH OPTIONS
.TP
\fIinput\fR
Input file. The filename suffix must be one of the currently supported
file formats, see below.
.TP
\fIoutput\fR
Output file. The filename suffix defines the output file format. It must be
one from the table below. An existing file can be overwritten by the
\fB\-\-force\fR option.
.TP
\fB\-\-help\fR
Print help and exit.
.TP
\fB\-\-force\fR
Force an already existing output file to be replaced.

.SH SUPPORTED FILE FORMATS

The current version of this tool does not read the list of available input
and output filters directly from OpenOffice.org. The list of supported file
formats is hardcoded and thus limited to:
.TP
\fIdoc\fR
Microsoft Word 97/2000/XP
.TP
\fIdocx\fR
MS Word 2007 XML
.TP
\fIdot\fR
Microsoft Word 97/2000/XP Template
.TP
\fIdocx\fR
MS Word 2007 XML Template
.TP
\fIhtml\fR
HyperText Markup Language (Web Page)
.TP
\fIodt\fR
ODF Text Document
.TP
\fIods\fR
ODF Spreadsheet
.TP
\fIodp\fR
ODF Presentation
.TP
\fIott\fR
ODF Text Document Template
.TP
\fIots\fR
ODF Spreadsheet Template
.TP
\fIotp\fR
ODF Presentation Template
.TP
\fIpdf\fR
Portable Document Format
.TP
\fIppt\fR
Microsoft PowerPoint 97/2000/XP
.TP
\fIpptx\fR
Microsoft PowerPoint 2007 XML
.TP
\fIpot\fR
Microsoft PowerPoint 97/2000/XP Template
.TP
\fIpotx\fR
Microsoft PowerPoint 2007 XML Template
.TP
\fIrtf\fR
Rich Text Format
.TP
\fIstc\fR
OpenOffice.org 1.0 Spreadsheet Template
.TP
\fIsti\fR
OpenOffice.org 1.0 Presentation Template
.TP
\fIstw\fR
OpenOffice.org 1.0 Text Document Template
.TP
\fIsxc\fR
OpenOffice.org 1.0 Spreadsheet
.TP
\fIsxi\fR
OpenOffice.org 1.0 Presentation
.TP
\fIsxw\fR
OpenOffice.org 1.0 Text Document
.TP
\fIswf\fR
Macromedia Flash
.TP
\fItxt\fR
Plain Text
.TP
\fIxls\fR
Microsoft Excel 97/2000/XP
.TP
\fIxlsx\fR
Microsoft Excel 2007 XML
.TP
\fIxlt\fR
Microsoft Excel 97/2000/XP Template
.TP
\fIxltx\fR
Microsoft Excel 2007 XML Template


.SH TROUBLESHOOTING PROBLEMS

See \fBhttp://en.opensuse.org/Bugs:OOo\fR for more details about how to report
bugs in OpenOffice.org.
.SH AUTHOR
This manual page was created by Petr Mladek <petr.mladek@xxxxxxxxxx>.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages