-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from sharkboyto/develop
2022.1.1
- Loading branch information
Showing
29 changed files
with
472 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
* Autori: Alessandro Albano, Davide De Carne, Simone Dal Maso | ||
* Download [versione stabile][1] | ||
* Compatibilità NVDA: 2021.2 e successive | ||
* Compatibilità NVDA: 2019.3 e successive | ||
|
||
Nao (NVDA Advanced OCR) è un addon che migliora le capacità OCR standard fornite da NVDA nelle versioni moderne di Windows. | ||
Mentre il comando standard NVDA utilizza l'OCR di Windows per riconoscere lo schermo, NAO è in grado di eseguire l'OCR sui file salvati sul disco rigido o sui dispositivi USB. | ||
|
@@ -13,7 +13,7 @@ Nao è in grado di gestire anche pdf multipagina, quindi se hai un documento non | |
|
||
## Requisiti di sistema | ||
L'addon lavora soltanto sui sistemi Windows 10 e Windows 11, poiché dispongono di funzionalità OCR integrate. | ||
Nao è compatibile dalla versione NVDA 2021.2, quindi non utilizzare versioni precedenti dello screen reader. | ||
Nao è compatibile dalla versione NVDA 2019.3, quindi non utilizzare versioni precedenti dello screen reader. | ||
Si noti che Nao funziona con Windows Explorer, sul desktop, con il file manager Total Commander o Xplorer; non utilizzare altri software come 7zip o Winrar, poiché non sono supportati. | ||
|
||
## Funzionalità e comandi | ||
|
@@ -41,6 +41,12 @@ Se pensi che il nostro lavoro sia buono e migliori la tua vita, a <a href="https | |
Vuoi segnalare un bug, suggerire nuove funzionalità, tradurre l'addon nella tua lingua? Abbiamo l'e-mail per te! Scrivi a [email protected] e saremo felici di aiutarti. | ||
|
||
## Cronologia | ||
### 2022.1.1 | ||
* Supporto file formato DjVu. | ||
* Supporto file tiff multipagina. | ||
* Risoluzione bug di encoding nel riconoscimento file PDF su sistemi operativi in lingua cinese. | ||
* Update manuale dell'addon da menu strumenti di NVDA. | ||
* Compatibilità a partire da NVDA 2019.3. | ||
### 2022.1 | ||
* Update automatico dell'addon. | ||
* Aggiornate traduzioni in spagnolo e francese. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
addon/globalPlugins/nao/framework/converters/djvu_converter.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#Nao (NVDA Advanced OCR) is an addon that improves the standard OCR capabilities that NVDA provides on modern Windows versions. | ||
#This file is covered by the GNU General Public License. | ||
#See the file COPYING for more details. | ||
#Last update 2022-01-04 | ||
#Copyright (C) 2021 Alessandro Albano, Davide De Carne and Simone Dal Maso | ||
|
||
import os | ||
import subprocess | ||
from .base.converter import Converter | ||
|
||
class DjVuConverter(Converter): | ||
def __init__(self, clear_on_destruct=True): | ||
super(DjVuConverter, self).__init__("tmp_djvu", clear_on_destruct) | ||
self._to_tiff_tool = os.path.join(self._addon_path, "tools", "djvu", "ddjvu.exe") | ||
self._info_tool = os.path.join(self._addon_path, "tools", "djvu", "djvused.exe") | ||
self._djvu_pages = False | ||
|
||
def convert(self, djvu_file, on_finish=None, on_progress=None, progress_timeout=1): | ||
self._djvu_pages = False | ||
self._convert(djvu_file, "tiff", on_finish, on_progress, progress_timeout) | ||
|
||
@property | ||
def count(self): | ||
return self._djvu_pages | ||
|
||
def _command(self, type): | ||
return "\"{}\" -skip -eachpage -format=tiff -quality=deflate \"{}\" \"{}-%06d.tiff\"".format(self._to_tiff_tool, self.source_file, os.path.join(self.temp_path, self.instance_id)) | ||
|
||
def _thread(self): | ||
self._fetch_info() | ||
super(DjVuConverter, self)._thread() | ||
|
||
def _fetch_info(self): | ||
# The next two lines are to prevent the cmd from being displayed. | ||
si = subprocess.STARTUPINFO() | ||
si.dwFlags |= subprocess.STARTF_USESHOWWINDOW | ||
|
||
cmd = "\"{}\" -e n \"{}\"".format(self._info_tool, self.source_file) | ||
p = subprocess.Popen(cmd, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=si, encoding="unicode_escape", text=True) | ||
stdout, stderr = p.communicate() | ||
if p.returncode == 0 and stdout: | ||
try: | ||
self._djvu_pages = int(stdout) | ||
except: | ||
self._djvu_pages = False | ||
else: | ||
self._djvu_pages = False | ||
|
||
DjVuConverter().clear_all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+1.08 MB
addon/globalPlugins/nao/framework/converters/tools/djvu/libdjvulibre.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.