[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#928123: unblock: lios/2.7-3



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package lios

lios is a graphical interface for performing OCR.

A user reported lios as very partially working on his KDE-based
system. He could run OCR over a whole image, but not select a piece of
the image to e.g. extract columns etc. This is merely due to a missing
dependency on python3-gi-cairo.

Alongside, he reported issues with divisions by zero which have already
been fixed upstream, and lios also not finding his German dictionary
(thus severily limiting the OCR desambiguation capabilities in German),
due to mere typos in the language list.

Eventually, when gnome-icon-theme is not installed the menu icons are
bogus, so this also pulls them.

unblock lios/2.7-3

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.0.0 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-- 
Samuel
Linux, c'est simple : ça s'adresse à une machine qui est parfois un peu
maraboutée mais qui d'habitude n'a pas d'états d'âme. Sur Usenet y'a
plein d'humains et de primates, et ça devient vraiment gore par moment.
-+- TP in : Guide du linuxien pervers - "Le linuxien a-t-il une âme ?" -+-
diff -Nru lios-2.7/debian/changelog lios-2.7/debian/changelog
--- lios-2.7/debian/changelog	2018-04-29 12:27:19.000000000 +0200
+++ lios-2.7/debian/changelog	2019-04-28 17:07:47.000000000 +0200
@@ -1,3 +1,12 @@
+lios (2.7-3) unstable; urgency=medium
+
+  * patches/div0: Avoid division by zero on no selection.
+  * patches/typo: Fix german language ISO code.
+  * control: Add missing python3-gi-cairo dependency (Closes: Bug#927770),
+    and recommend gnome-icon-theme to get menu icons.
+
+ -- Samuel Thibault <sthibault@debian.org>  Sun, 28 Apr 2019 17:07:47 +0200
+
 lios (2.7-2) unstable; urgency=medium
 
   * Add missing gir1.2-gstreamer-1.0 dependency (Closes: Bug#895673).
diff -Nru lios-2.7/debian/control lios-2.7/debian/control
--- lios-2.7/debian/control	2018-04-28 17:02:59.000000000 +0200
+++ lios-2.7/debian/control	2019-04-28 14:18:23.000000000 +0200
@@ -11,7 +11,8 @@
 
 Package: lios
 Architecture: all
-Depends: ${python3:Depends}, ${misc:Depends}, python3-gi, gir1.2-gtk-3.0, gir1.2-gst-plugins-base-1.0, gir1.2-gstreamer-1.0, gir1.2-vte-2.91, python3-sane, python3-speechd, tesseract-ocr, imagemagick, espeak, poppler-utils, python3-enchant, aspell-en
+Depends: ${python3:Depends}, ${misc:Depends}, python3-gi, gir1.2-gtk-3.0, gir1.2-gst-plugins-base-1.0, gir1.2-gstreamer-1.0, gir1.2-vte-2.91, python3-sane, python3-speechd, tesseract-ocr, imagemagick, espeak, poppler-utils, python3-enchant, aspell-en, python3-gi-cairo
+Recommends: gnome-icon-theme
 Suggests: cuneiform
 Description: Linux intelligent OCR solution
  Lios provides a graphical interface on top of the Cuneiform and
diff -Nru lios-2.7/debian/patches/div0 lios-2.7/debian/patches/div0
--- lios-2.7/debian/patches/div0	1970-01-01 01:00:00.000000000 +0100
+++ lios-2.7/debian/patches/div0	2019-04-28 17:06:40.000000000 +0200
@@ -0,0 +1,162 @@
+Part of this is already upstream, the other part has been submitted to
+https://gitlab.com/Nalin-x-Linux/lios-3/merge_requests/5
+---
+ lios/main.py |  126 +++++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 67 insertions(+), 59 deletions(-)
+
+--- a/lios/main.py
++++ b/lios/main.py
+@@ -1099,27 +1099,29 @@ class linux_intelligent_ocr_solution():
+ 		#self.make_ocr_widgets_inactive(lock=True)
+ 		#self.make_preferences_widgets_inactive(lock=True)
+ 		#self.make_image_widgets_inactive(lock=True)
+-		progress_step = 1/len(self.iconview.get_selected_item_names())
+-		progress = 0;
+-		mode = self.preferences.mode_of_rotation
+-		angle = self.preferences.rotation_angle
+-		for item in self.iconview.get_selected_item_names():
+-			self.notify_information(_("Running OCR on selected image {}")
+-			.format(item))
+-			
+-			#self.announce(_("Recognising {}").format(self.liststore_images[item[0]][1]))
+-			progress = progress + progress_step;			
+-			text,angle = self.ocr(item,mode,angle)
+-			self.insert_text_to_textview(text,self.preferences.insert_position,True)
+-			self.preferences.update_page_number()
+-			loop.acquire_lock()
+-			self.iconview.reload_preview(item)
+-			loop.release_lock()
+-			if mode == 1:#Changing partial automatic to Manual
+-				mode = 2
+-				#self.announce(_("Angle to be rotated = {}").format(angle))
+-			if(self.process_breaker):
+-				break
++		length = len(self.iconview.get_selected_item_names())
++		if length > 0:
++			progress_step = 1/length
++			progress = 0;
++			mode = self.preferences.mode_of_rotation
++			angle = self.preferences.rotation_angle
++			for item in self.iconview.get_selected_item_names():
++				self.notify_information(_("Running OCR on selected image {}")
++				.format(item))
++
++				#self.announce(_("Recognising {}").format(self.liststore_images[item[0]][1]))
++				progress = progress + progress_step;
++				text,angle = self.ocr(item,mode,angle)
++				self.insert_text_to_textview(text,self.preferences.insert_position,True)
++				self.preferences.update_page_number()
++				loop.acquire_lock()
++				self.iconview.reload_preview(item)
++				loop.release_lock()
++				if mode == 1:#Changing partial automatic to Manual
++					mode = 2
++					#self.announce(_("Angle to be rotated = {}").format(angle))
++				if(self.process_breaker):
++					break
+ 		self.imageview.redraw()
+ 		#self.make_ocr_widgets_active(lock=True)
+ 		#self.make_preferences_widgets_active(lock=True)
+@@ -1136,19 +1138,21 @@ class linux_intelligent_ocr_solution():
+ 		#self.make_ocr_widgets_inactive(lock=True)
+ 		#self.make_preferences_widgets_inactive(lock=True)
+ 		#self.make_image_widgets_inactive(lock=True)
+-		progress_step = 1/len(self.iconview.get_selected_item_names())
+-		progress = 0;
+-		for item in self.iconview.get_selected_item_names():
+-			self.notify_information(_("Running OCR on selected image {} (without rotating)")
+-			.format(item))
+-			
+-			#self.announce(_("Recognising {} without rotating").format(self.liststore_images[item[0]][1]))
+-			progress = progress + progress_step;
+-			text,angle = self.ocr(item,2,00)
+-			self.insert_text_to_textview(text,self.preferences.insert_position,True)
+-			self.preferences.update_page_number()
+-			if(self.process_breaker):
+-				break
++		length = len(self.iconview.get_selected_item_names())
++		if length > 0:
++			progress_step = 1/length
++			progress = 0;
++			for item in self.iconview.get_selected_item_names():
++				self.notify_information(_("Running OCR on selected image {} (without rotating)")
++				.format(item))
++
++				#self.announce(_("Recognising {} without rotating").format(self.liststore_images[item[0]][1]))
++				progress = progress + progress_step;
++				text,angle = self.ocr(item,2,00)
++				self.insert_text_to_textview(text,self.preferences.insert_position,True)
++				self.preferences.update_page_number()
++				if(self.process_breaker):
++					break
+ 		self.notify_information(_("completed!"),0)
+ 		#self.announce(_("Completed!"))
+ 		#self.make_ocr_widgets_active(lock=True)
+@@ -1182,16 +1186,18 @@ class linux_intelligent_ocr_solution():
+ 		if(len(self.iconview.get_selected_item_names()) == 0):
+ 			self.notify_information(_("Nothing selected"),0)
+ 			return
+-		progress_step = 1/len(self.iconview.get_selected_item_names())
+-		progress = 0;
+-		for item in reversed(self.iconview.get_selected_item_names()):
+-			os.system("convert -rotate {0} {1} {1}".format(angle,item))
+-			loop.acquire_lock()
+-			self.iconview.reload_preview(item)
+-			loop.release_lock()
+-			self.notify_information(_("Rotating selected image {} to {}")
+-			.format(item,angle),progress)
+-			progress = progress + progress_step;
++		length = len(self.iconview.get_selected_item_names())
++		if length > 0:
++			progress_step = 1/length
++			progress = 0;
++			for item in reversed(self.iconview.get_selected_item_names()):
++				os.system("convert -rotate {0} {1} {1}".format(angle,item))
++				loop.acquire_lock()
++				self.iconview.reload_preview(item)
++				loop.release_lock()
++				self.notify_information(_("Rotating selected image {} to {}")
++				.format(item,angle),progress)
++				progress = progress + progress_step;
+ 		self.imageview.redraw()
+ 		self.notify_information(_("completed!"),0)
+ 
+@@ -1297,21 +1303,23 @@ class linux_intelligent_ocr_solution():
+ 		#self.make_preferences_widgets_inactive(lock=True)
+ 		#self.make_ocr_widgets_inactive(lock=True)
+ 		#self.make_image_widgets_inactive(lock=True)
+-		progress_step = 1/len(self.imageview.get_selection_list());
+-		progress = 0;
+-		for item in self.imageview.get_selection_list():
+-			self.notify_information(_("Running OCR on selected Area [ X={} Y={} Width={} Height={} ]")
+-			.format(item[0],item[1],item[2],item[3]))
+-			
+-			progress = progress + progress_step;
+-			self.imageview.save_sub_image("{0}tmp".format(macros.tmp_dir),
+-				item[0],item[1],item[2],item[3])
+-			
+-			#Will always be Manual with no rotation
+-			text,angle = self.ocr("{0}tmp".format(macros.tmp_dir),2,00)
+-			self.insert_text_to_textview(text,False,False)
+-			if(self.process_breaker):
+-				break;
++		length = len(self.imageview.get_selection_list())
++		if length > 0:
++			progress_step = 1/length
++			progress = 0;
++			for item in self.imageview.get_selection_list():
++				self.notify_information(_("Running OCR on selected Area [ X={} Y={} Width={} Height={} ]")
++				.format(item[0],item[1],item[2],item[3]))
++
++				progress = progress + progress_step;
++				self.imageview.save_sub_image("{0}tmp".format(macros.tmp_dir),
++					item[0],item[1],item[2],item[3])
++
++				#Will always be Manual with no rotation
++				text,angle = self.ocr("{0}tmp".format(macros.tmp_dir),2,00)
++				self.insert_text_to_textview(text,False,False)
++				if(self.process_breaker):
++					break;
+ 
+ 		self.notify_information(_("completed!"),0)
+ 		#self.make_preferences_widgets_active(lock=True)
diff -Nru lios-2.7/debian/patches/series lios-2.7/debian/patches/series
--- lios-2.7/debian/patches/series	2018-01-03 18:28:34.000000000 +0100
+++ lios-2.7/debian/patches/series	2019-04-27 10:33:41.000000000 +0200
@@ -1 +1,3 @@
 tesseract_langpath
+div0
+typo
diff -Nru lios-2.7/debian/patches/typo lios-2.7/debian/patches/typo
--- lios-2.7/debian/patches/typo	1970-01-01 01:00:00.000000000 +0100
+++ lios-2.7/debian/patches/typo	2019-04-28 17:06:50.000000000 +0200
@@ -0,0 +1,38 @@
+fix language name typos
+Submitted to https://gitlab.com/Nalin-x-Linux/lios-3/merge_requests/6
+
+---
+ lios/dictionary.py |   12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/lios/dictionary.py
++++ b/lios/dictionary.py
+@@ -24,11 +24,11 @@ dictionary_language_dict = {"eng" : "en"
+ 
+ 		#Recently added
+ 		"ben" : "bn","br" : "br","cat" : "ca","ces" : "cs","cy" : "cy",
+-		"dan" : "da","ger" : "de","deu":"du","deu-frak":"du","ell":"el",
++		"dan" : "da","ger" : "de","deu":"de","deu-frak":"de","ell":"el",
+ 		"epo":"eo","eq":"en","eus":"eu-es","frk":"fk","frm":"fr-classical",
+ 		"grc":"el","ind":"id","isl":"is","ita-old" : "it","jpn":"jn",
+ 		"kan":"kn","kor":"ko","mkd":"md","mlt":"mt","msa":"ma","nld":"nl",
+-		"nor":"no","spa-old":"es","sqi":"si","srp":"sh","swa":"sw","tha":"th",
++                "nor":"no","spa-old":"es","sqi":"sq","srp":"sr","srp-latn":"sh","swa":"sw","tha":"th",
+ 		"tur":"tr","vie":"vi","glg" : "gl",
+ 
+ 		"ger" : "de","ell" : "el","eo" : "eo","spa" : "es","est" : "et",
+@@ -36,10 +36,10 @@ dictionary_language_dict = {"eng" : "en"
+ 		"ga" : "ga","gl" : "gl","gu" : "gu","heb" : "he","hin" : "hi",
+ 		"hrv" : "hr","hsb" : "hsb","hun" : "hu","hy" : "hy","id" : "id",
+ 		"is" : "is","ita" : "it","kk" : "kk","kn" : "kn","ku" : "ku",
+-		"lit" : "lt","lav" : "lv","mal" : "ml ","mr" : "mr ","dut" : "nl",
+-		"no" : "no","nr" : "nr","ns" : "ns ","or" : "or ","pa" : "pa ",
+-		"pol" : "pl ","por" : "pt","por" : "pt","por" : "pt","ron" : "ro",
+-		"rus" : "ru ","slk" : "sk","slv" : "sl","ss" : "ss","st" : "st",
++		"lit" : "lt","lav" : "lv","mal" : "ml", "mr" : "mr", "dut" : "nl",
++		"no" : "no","nr" : "nr","ns" : "ns", "or" : "or", "pa" : "pa",
++		"pol" : "pl", "por" : "pt","por" : "pt","por" : "pt","ron" : "ro",
++		"rus" : "ru", "slk" : "sk","slv" : "sl","ss" : "ss","st" : "st",
+ 		"swe" : "sv","tam" : "ta","tel" : "te","tl" : "tl","tn" : "tn",
+ 		"ts" : "ts","ukr" : "uk","uz" : "uz","xh" : "xh","zu" : "zu" }
+ 

Reply to: