[ocrfeeder] Do not ship odf package
- From: Joaquim Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Do not ship odf package
- Date: Tue, 7 Jan 2020 23:30:17 +0000 (UTC)
commit 648e39bc5e9259e410b3a3333d673ff516484b4b
Author: Joaquim Rocha <me joaquimrocha com>
Date: Mon Jan 6 22:09:56 2020 +0100
Do not ship odf package
A long, long time ago, when OCRFeeder was first released, there was
no Debian package for odfpy, so to it simple at the time it was shipped
with the rest of the source code.
There are packages available now, so we should drop odf from the source
tree, allowing to use updated versions with bug and security fixes.
This will also make it easier to port OCRFeeder to Python 3 as the odfpy
package doesn't need to be included in the port.
configure.ac | 2 +-
src/ocrfeeder/Makefile.am | 3 +-
src/ocrfeeder/feeder/documentGeneration.py | 8 +-
src/ocrfeeder/odf/Makefile.am | 37 -
src/ocrfeeder/odf/__init__.py | 0
src/ocrfeeder/odf/anim.py | 61 -
src/ocrfeeder/odf/attrconverters.py | 1441 -----
src/ocrfeeder/odf/chart.py | 87 -
src/ocrfeeder/odf/config.py | 39 -
src/ocrfeeder/odf/dc.py | 72 -
src/ocrfeeder/odf/dr3d.py | 43 -
src/ocrfeeder/odf/draw.py | 182 -
src/ocrfeeder/odf/element.py | 249 -
src/ocrfeeder/odf/form.py | 115 -
src/ocrfeeder/odf/grammar.py | 8138 ----------------------------
src/ocrfeeder/odf/load.py | 125 -
src/ocrfeeder/odf/manifest.py | 53 -
src/ocrfeeder/odf/math.py | 30 -
src/ocrfeeder/odf/meta.py | 66 -
src/ocrfeeder/odf/namespaces.py | 81 -
src/ocrfeeder/odf/number.py | 104 -
src/ocrfeeder/odf/odf2xhtml.py | 1124 ----
src/ocrfeeder/odf/odfmanifest.py | 120 -
src/ocrfeeder/odf/office.py | 104 -
src/ocrfeeder/odf/ooostyles.py | 71 -
src/ocrfeeder/odf/opendocument.py | 357 --
src/ocrfeeder/odf/presentation.py | 85 -
src/ocrfeeder/odf/script.py | 30 -
src/ocrfeeder/odf/style.py | 147 -
src/ocrfeeder/odf/svg.py | 52 -
src/ocrfeeder/odf/table.py | 307 --
src/ocrfeeder/odf/text.py | 559 --
src/ocrfeeder/odf/thumbnail.py | 433 --
src/ocrfeeder/odf/userfield.py | 310 --
src/ocrfeeder/odf/xforms.py | 29 -
src/ocrfeeder/util/lib.py | 4 +-
36 files changed, 8 insertions(+), 14660 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cda459f..8301c2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AX_PYTHON_MODULE([enchant],[needed])
AX_PYTHON_MODULE([sane],[needed])
AX_PYTHON_MODULE([PIL],[needed])
AX_PYTHON_MODULE([reportlab],[needed])
+AX_PYTHON_MODULE([odf],[needed])
dnl == Introspection Dependencies ==
@@ -74,7 +75,6 @@ bin/ocrfeeder-cli
src/Makefile
src/ocrfeeder/Makefile
src/ocrfeeder/feeder/Makefile
-src/ocrfeeder/odf/Makefile
src/ocrfeeder/studio/Makefile
src/ocrfeeder/util/Makefile
src/ocrfeeder/util/constants.py
diff --git a/src/ocrfeeder/Makefile.am b/src/ocrfeeder/Makefile.am
index 3bf4845..e83f660 100644
--- a/src/ocrfeeder/Makefile.am
+++ b/src/ocrfeeder/Makefile.am
@@ -6,8 +6,7 @@ ocrfeeder_PYTHON = \
SUBDIRS = \
feeder/ \
studio/ \
- util/ \
- odf/
+ util/
clean-local:
rm -rf *.pyc *.pyo
\ No newline at end of file
diff --git a/src/ocrfeeder/feeder/documentGeneration.py b/src/ocrfeeder/feeder/documentGeneration.py
index 152e9c3..c08a8ab 100644
--- a/src/ocrfeeder/feeder/documentGeneration.py
+++ b/src/ocrfeeder/feeder/documentGeneration.py
@@ -18,11 +18,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###########################################################################
-from ocrfeeder.odf.draw import Frame, TextBox, Image
-from ocrfeeder.odf.opendocument import OpenDocumentText
-from ocrfeeder.odf.style import Style, MasterPage, GraphicProperties, ParagraphProperties, \
+from odf.draw import Frame, TextBox, Image
+from odf.opendocument import OpenDocumentText
+from odf.style import Style, MasterPage, GraphicProperties, ParagraphProperties, \
TextProperties, PageLayout, PageLayoutProperties
-from ocrfeeder.odf.text import P, Page, PageSequence
+from odf.text import P, Page, PageSequence
from ocrfeeder.util import TEXT_TYPE, IMAGE_TYPE, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER, \
ALIGN_FILL
from ocrfeeder.util.configuration import ConfigurationManager
diff --git a/src/ocrfeeder/util/lib.py b/src/ocrfeeder/util/lib.py
index db60c75..c552d5a 100644
--- a/src/ocrfeeder/util/lib.py
+++ b/src/ocrfeeder/util/lib.py
@@ -29,7 +29,7 @@ from constants import *
import sane
import tempfile
import locale
-from lxml import etree
+import xml.etree.ElementTree as etree
from log import debug
def getIconOrLabel(icon_name, label_text, icon_size = Gtk.IconSize.SMALL_TOOLBAR):
@@ -178,7 +178,7 @@ def getLanguages():
global languages
if not languages:
root = etree.parse(ISO_CODES_PATH + 'iso_639.xml')
- for element in root.findall('//iso_639_entry[@iso_639_1_code]'):
+ for element in root.findall('.//iso_639_entry[@iso_639_1_code]'):
languages[element.get('iso_639_1_code')] = element.get('name')
return languages
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]