chrys87 / ocrdesktop Goto Github PK
View Code? Open in Web Editor NEWAccessiblity tool for use the current window with OCR technique
Home Page: https://wiki.archlinux.org/index.php/Ocrdesktop
Accessiblity tool for use the current window with OCR technique
Home Page: https://wiki.archlinux.org/index.php/Ocrdesktop
Hello all,
It seems the Tesseract data directory is not the same between Debian and Arch so this time ocrdesktop can't find the data directory.
I'll propose a patch to fix that.
Best regards.
Hello,
on latest ARch Linux, probably after upgrade to Python 3.10, the ap does not work.
I get this:
Traceback (most recent call last):
File "/usr/bin/ocrdesktop", line 23, in
from tesserwrap import tesseract
File "/usr/lib/python3.10/site-packages/tesserwrap/init.py", line 1, in
from .core import tr
File "/usr/lib/python3.10/site-packages/tesserwrap/core.py", line 74, in
tr = load_library('libtesserwrap', os.path.dirname(file))
File "/usr/lib/python3.10/site-packages/tesserwrap/core.py", line 70, in load_library
raise exc
File "/usr/lib/python3.10/site-packages/tesserwrap/core.py", line 67, in load_library
return cdll[libpath]
File "/usr/lib/python3.10/ctypes/init.py", line 449, in getitem
return getattr(self, name)
File "/usr/lib/python3.10/ctypes/init.py", line 444, in getattr
dll = self._dlltype(name)
File "/usr/lib/python3.10/ctypes/init.py", line 374, in init
self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/python3.10/site-packages/libtesserwrap.so: cannot open shared object file: No such file or directory
However, the python-tesserwrap package is installed, I compiled it against the latest Python.
Please provide a setup.py installation script using either distutils or
setuptools to ease the installation in development scenarios (virtualenv) and
for packaging.
Thanks
Tested this on ArchLinux with kde Plasma 5.27.6, wayland session.
OCRDesktop does not work under Wayland.
Steps to reproduce:
Expected results: OCRDesktop should work under Wayland as well, giving the user more flexibility of choice when it comes to display server.
Actual results: the program does not work under Wayland at all.
OCR desktop provides a gui interface that with a number of options. It generates a list of the rectangles of each word, which could potentially be used to facilitate word highlighting for the screen reader. My goal is to allow a screenshot to be taken similar to gnome-screenshot area selection and still know the position of every word.
some options are:
Does one of these seam like the most practical?
Please bear in mind that I am a high school student with mediocre time management skills. Also considered that we are discussing libraries that I know very little about.
Arch Linux, Ocrdesktop from git (AUR package), Tesseract 4.0.0.
When running just ocrdesktop I get this:
❯ ocrdesktop
/usr/bin/ocrdesktop:413: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_toggleview = Gtk.MenuItem("Toggle _View")
/usr/bin/ocrdesktop:416: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_ocroptions = Gtk.MenuItem("_OCR Options")
/usr/bin/ocrdesktop:420: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_invert = Gtk.CheckMenuItem("_Invert")
/usr/bin/ocrdesktop:422: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_grayscale = Gtk.CheckMenuItem("_Grayscale")
/usr/bin/ocrdesktop:424: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_barrierbw = Gtk.CheckMenuItem("_Barrier Black White")
/usr/bin/ocrdesktop:436: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_retry = Gtk.MenuItem("_Retry OCR")
/usr/bin/ocrdesktop:439: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_clipboard = Gtk.MenuItem("Send to _Clipboard")
/usr/bin/ocrdesktop:442: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_font = Gtk.MenuItem("_Font")
/usr/bin/ocrdesktop:444: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_close = Gtk.MenuItem("_Close")
/usr/bin/ocrdesktop:459: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_preclick = Gtk.CheckMenuItem("_Preclick")
/usr/bin/ocrdesktop:462: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_leftclick = Gtk.MenuItem("_Left Click")
/usr/bin/ocrdesktop:465: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_doubletclick = Gtk.MenuItem("_Double Click")
/usr/bin/ocrdesktop:468: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_rightclick = Gtk.MenuItem("_Right Click")
/usr/bin/ocrdesktop:471: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_middleclick = Gtk.MenuItem("_Middle Click")
/usr/bin/ocrdesktop:474: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_routeto = Gtk.MenuItem("Route _To")
/usr/bin/ocrdesktop:477: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_sendkey = Gtk.MenuItem("Send _Key")
/usr/bin/ocrdesktop:496: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_save = Gtk.MenuItem("_Save As")
/usr/bin/ocrdesktop:499: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_load = Gtk.MenuItem("_Load")
/usr/bin/ocrdesktop:502: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_delete = Gtk.MenuItem("_Unload")
/usr/bin/ocrdesktop:505: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_run = Gtk.MenuItem("_Run")
/usr/bin/ocrdesktop:518: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_about = Gtk.MenuItem("_About")
/usr/bin/ocrdesktop:523: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_ocrdesktop = Gtk.MenuItem("_OCRDesktop")
/usr/bin/ocrdesktop:525: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_interact = Gtk.MenuItem("_Interact")
/usr/bin/ocrdesktop:527: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_macro = Gtk.MenuItem("_Macro")
/usr/bin/ocrdesktop:529: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self.item_help = Gtk.MenuItem("_Help")
/usr/bin/ocrdesktop:542: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
self._keyboardOverlayLabel = Gtk.Label("Please insert keyboard commands. exit with: F4")
/usr/bin/ocrdesktop:207: DeprecationWarning: Soon 'tesseract' will be deprecated, use Tesseract instead
self._tess = tesseract(tesseractData, self._languageCode)
!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 209
Neoprávněný přístup do paměti (SIGSEGV) (core dumped [obraz paměti uložen])
Hello all,
When you try to run the ocrdesktop script like this:
./ocridesktop
You will obtain the following error:
bash: ./ocrdesktop: /bin/python3: bad interpreter: No such file or directory
On Debian, the python3 binary is on "/usr/bin/python3". I assume it's the same on Arch, can you confirm this to me? If yes, I could send you a pull request to fix that or you could do that yourself as the change looks easy to do..
Best regards.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.