Date   

Re: Text Analyzer #addonrequest

René Linke
 

Hi,

but that add-on you referrd, that is very huge and very detailed. It has too many features in it, I wish that add-on would be split up in different smaller add-ons, though.

cheers,
René

Am 20.06.2022 um 18:19 schrieb Ângelo Abrantes:

Hi,


This addon is alread created:

NVDA global Extension

Às 16:28 de 20-06-2022, Noah Carver escreveu:
Dear List,

A particular feature which I have found quite useful in JAWS is the Text Analyzer, which checks for various errors including extra spaces, unmatched opening and closing symbols, font changes, ETC. and notifies the user so that they may fix the mistake. This feature would be immensely helpful for NVDA users, and I am therefore requesting an add-on which adds this functionality. The documentation describing the text analyzer is pasted below, fully describing how the functionality operates, its configuration options, ETC.

If any developer would be interested in creating this add-on, it would not only be appreciated by me, but also by many NVDA users who write often. Thank you for your time and interest.

Sincerely,

Noah

--Documentation starts here--

Text Analyzer Group

When editing a document using speech only, inconsistencies such as unmatched parentheses, unintentional format changes, extra whitespace, and stray or unspaced punctuation can often be missed. Text Analyzer is a tool that notifies you of these errors in your document by using a spoken message or WAV file. You can configure JAWS to announce discrepancies by count, by description, or by sound while proofreading the document by line, sentence, paragraph, or Say All command. Braille users will benefit from this since a sound can be emitted before the user has time to read the entire line looking for errors.

Turning On Text Analyzer

Text Analyzer is off by default. To turn it on, do one of the following:

  • Use the layered keystroke, INSERT+SPACEBAR, A. By pressing and releasing INSERT+SPACEBAR, and then pressing A, the Text Analyzer can be toggled on or off.
  • Open Settings Center (INSERT+F2). In the Search edit box type "text analyzer" without the quotes. Press DOWN ARROW to move to Text Analyzer in the filtered results. Press SPACEBAR to select an alert notification.
  • Use Quick Settings (INSERT+V). The process for selecting an alert notification is the same as the Settings Center procedure described above.

Keystrokes

If multiple issues are identified in the document, press ALT+WINDOWS Key+I to move to the next item, or ALT+SHIFT+WINDOWS Key+I to move to the previous item. Note that these keystrokes can still be used even if Text Analyzer is off.

Text Analyzer Options

Use the radio buttons in this group to determine the type of alert used to indicate errors when editing or proofreading a document by line, sentence, paragraph, or Say All command. Select Indicate with Sound to play a WAV file when a formatting error is detected. Select Speak Count to announce the number of inconsistencies in the current text. Select Describe Inconsistencies for a description of the error. The default setting is off.

Indicate Mismatched Symbols

Select this check box to enable the detection of mismatched symbols such as parenthesis, braces, brackets, angle brackets, and quotes. If this check box is cleared, the items in the Symbols to Check group are not available.

Symbols to Check

Select one or more check boxes to search for mismatched parentheses, braces, brackets, angle brackets, or quotes where the equivalent opening or closing symbol is missing. These check boxes are only available when the Indicate Mismatched Symbols check box is selected.

Inconsistencies to Check

Select one or more check boxes to identify inconsistencies with stray punctuation, extra spaces, missing capital letters, or inverted lowercase and uppercase text.

Font Changes to Check

Select one or more check boxes to identify incorrect font changes in the current text including name, size, attributes, and colors.

-- 
Cordiais Cumprimentos
Ângelo Abrantes, Equipa <Portuguesa do NVDA

Sem vírus. www.avast.com


Re: Text Analyzer #addonrequest

Ângelo Abrantes
 

Hi,


This addon is alread created:

NVDA global Extension

Às 16:28 de 20-06-2022, Noah Carver escreveu:
Dear List,

A particular feature which I have found quite useful in JAWS is the Text Analyzer, which checks for various errors including extra spaces, unmatched opening and closing symbols, font changes, ETC. and notifies the user so that they may fix the mistake. This feature would be immensely helpful for NVDA users, and I am therefore requesting an add-on which adds this functionality. The documentation describing the text analyzer is pasted below, fully describing how the functionality operates, its configuration options, ETC.

If any developer would be interested in creating this add-on, it would not only be appreciated by me, but also by many NVDA users who write often. Thank you for your time and interest.

Sincerely,

Noah

--Documentation starts here--

Text Analyzer Group

When editing a document using speech only, inconsistencies such as unmatched parentheses, unintentional format changes, extra whitespace, and stray or unspaced punctuation can often be missed. Text Analyzer is a tool that notifies you of these errors in your document by using a spoken message or WAV file. You can configure JAWS to announce discrepancies by count, by description, or by sound while proofreading the document by line, sentence, paragraph, or Say All command. Braille users will benefit from this since a sound can be emitted before the user has time to read the entire line looking for errors.

Turning On Text Analyzer

Text Analyzer is off by default. To turn it on, do one of the following:

  • Use the layered keystroke, INSERT+SPACEBAR, A. By pressing and releasing INSERT+SPACEBAR, and then pressing A, the Text Analyzer can be toggled on or off.
  • Open Settings Center (INSERT+F2). In the Search edit box type "text analyzer" without the quotes. Press DOWN ARROW to move to Text Analyzer in the filtered results. Press SPACEBAR to select an alert notification.
  • Use Quick Settings (INSERT+V). The process for selecting an alert notification is the same as the Settings Center procedure described above.

Keystrokes

If multiple issues are identified in the document, press ALT+WINDOWS Key+I to move to the next item, or ALT+SHIFT+WINDOWS Key+I to move to the previous item. Note that these keystrokes can still be used even if Text Analyzer is off.

Text Analyzer Options

Use the radio buttons in this group to determine the type of alert used to indicate errors when editing or proofreading a document by line, sentence, paragraph, or Say All command. Select Indicate with Sound to play a WAV file when a formatting error is detected. Select Speak Count to announce the number of inconsistencies in the current text. Select Describe Inconsistencies for a description of the error. The default setting is off.

Indicate Mismatched Symbols

Select this check box to enable the detection of mismatched symbols such as parenthesis, braces, brackets, angle brackets, and quotes. If this check box is cleared, the items in the Symbols to Check group are not available.

Symbols to Check

Select one or more check boxes to search for mismatched parentheses, braces, brackets, angle brackets, or quotes where the equivalent opening or closing symbol is missing. These check boxes are only available when the Indicate Mismatched Symbols check box is selected.

Inconsistencies to Check

Select one or more check boxes to identify inconsistencies with stray punctuation, extra spaces, missing capital letters, or inverted lowercase and uppercase text.

Font Changes to Check

Select one or more check boxes to identify incorrect font changes in the current text including name, size, attributes, and colors.

-- 
Cordiais Cumprimentos
Ângelo Abrantes, Equipa <Portuguesa do NVDA

Sem vírus. www.avast.com


Text Analyzer #addonrequest

 

Dear List,

A particular feature which I have found quite useful in JAWS is the Text Analyzer, which checks for various errors including extra spaces, unmatched opening and closing symbols, font changes, ETC. and notifies the user so that they may fix the mistake. This feature would be immensely helpful for NVDA users, and I am therefore requesting an add-on which adds this functionality. The documentation describing the text analyzer is pasted below, fully describing how the functionality operates, its configuration options, ETC.

If any developer would be interested in creating this add-on, it would not only be appreciated by me, but also by many NVDA users who write often. Thank you for your time and interest.

Sincerely,

Noah

--Documentation starts here--

Text Analyzer Group

When editing a document using speech only, inconsistencies such as unmatched parentheses, unintentional format changes, extra whitespace, and stray or unspaced punctuation can often be missed. Text Analyzer is a tool that notifies you of these errors in your document by using a spoken message or WAV file. You can configure JAWS to announce discrepancies by count, by description, or by sound while proofreading the document by line, sentence, paragraph, or Say All command. Braille users will benefit from this since a sound can be emitted before the user has time to read the entire line looking for errors.

Turning On Text Analyzer

Text Analyzer is off by default. To turn it on, do one of the following:

  • Use the layered keystroke, INSERT+SPACEBAR, A. By pressing and releasing INSERT+SPACEBAR, and then pressing A, the Text Analyzer can be toggled on or off.
  • Open Settings Center (INSERT+F2). In the Search edit box type "text analyzer" without the quotes. Press DOWN ARROW to move to Text Analyzer in the filtered results. Press SPACEBAR to select an alert notification.
  • Use Quick Settings (INSERT+V). The process for selecting an alert notification is the same as the Settings Center procedure described above.

Keystrokes

If multiple issues are identified in the document, press ALT+WINDOWS Key+I to move to the next item, or ALT+SHIFT+WINDOWS Key+I to move to the previous item. Note that these keystrokes can still be used even if Text Analyzer is off.

Text Analyzer Options

Use the radio buttons in this group to determine the type of alert used to indicate errors when editing or proofreading a document by line, sentence, paragraph, or Say All command. Select Indicate with Sound to play a WAV file when a formatting error is detected. Select Speak Count to announce the number of inconsistencies in the current text. Select Describe Inconsistencies for a description of the error. The default setting is off.

Indicate Mismatched Symbols

Select this check box to enable the detection of mismatched symbols such as parenthesis, braces, brackets, angle brackets, and quotes. If this check box is cleared, the items in the Symbols to Check group are not available.

Symbols to Check

Select one or more check boxes to search for mismatched parentheses, braces, brackets, angle brackets, or quotes where the equivalent opening or closing symbol is missing. These check boxes are only available when the Indicate Mismatched Symbols check box is selected.

Inconsistencies to Check

Select one or more check boxes to identify inconsistencies with stray punctuation, extra spaces, missing capital letters, or inverted lowercase and uppercase text.

Font Changes to Check

Select one or more check boxes to identify incorrect font changes in the current text including name, size, attributes, and colors.


Re: Dropbox tray gone inaccessible again

Rui Fontes
 

Sorry, but which last version?


I am using:

NVDA alpha-25623,1d24f9b0

Dropbox 150.4.5000


and the copy notiffications are announced by NVDA as normally...


The last version fo the add-on only announces the presence or absence of the Dropbox icon on systray and if it is there, can allso announce the status...


Best regards,

Rui Fontes
NVDA portuguese team




Às 09:35 de 20/06/2022, Brian's Mail list account via groups.io escreveu:

Not only those but the ding and alert copied to clipboard when you copy link to clipboard no longer is indicated in the latest version and current nvda.
Brian


Re: Dropbox tray gone inaccessible again

Brian's Mail list account
 

Not only those but the ding and alert copied to clipboard when you copy link to clipboard no longer is indicated in the latest version and current nvda.
Brian

--
bglists@...
Sent via blueyonder.(Virgin media)
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

----- Original Message -----
From: "Brian's Mail list account via groups.io" <bglists@...>
To: <nvda-addons@nvda-addons.groups.io>
Sent: Saturday, June 18, 2022 11:47 AM
Subject: [nvda-addons] Dropbox tray gone inaccessible again


Is the author of the dropbox add on here?
At the moment no alerts are given when a shared folder is changed and the
normal menu off of the dropbox tray icon no longer operates, bringing up a
tray assistant window apparently with nothing inside it. I just don't get
how they can get it so wrong. Maybe if anyone has any contacts at Dropbox
you could alert them to this regression. Thanks.
Brian

--
bglists@...
Sent via blueyonder.(Virgin media)
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.


NVDA 2022.2 Beta 2 now available

Quentin Christensen
 

Hi everyone,

NVDA 2022.2 Beta 2 is now available for download & testing for those who wish to try out what the next version of NVDA will have to offer before it comes out. 

This beta fixes a bug from Beta 1 and adds some updates to translations.


Kind regards

Quentin.

--
Quentin Christensen
Training and Support Manager


Re: golden cursor problem

leglaude
 

 
hi!it's good, thanks!

----- Original Message -----
Sent: Saturday, June 18, 2022 11:41 PM
Subject: Re: [nvda-addons] golden cursor problem

Hi,
The file.gc should be constructed by goldenCursor addon.
it is just a file to preserve the positions of the mouse in specific application.
So if you mean that your file, heartstone.gc
has been created by another instance of goldenCursor addon, and you want to include it in your current addon
Really goldenCursor does not have an import feature
So, you have to copy the file heartstone.gc
then enter the folder of goldenCursor addon
in the root folder of the addon, meaning this folder
you may find a folder named mousePositions
now enter it, and paste your .gc file in it.
If you did not find the folder named mousePositions
then that means, you haven't yet save any positions using the addon
Try to save one positions for any program, say notepad for instance
after that the folder mousePositions, will show up, and you can paste your file in it.
Then restart NVDA, and go on.
 regards
 
 ibrahim

On 6/18/2022 11:05 AM, leglaude wrote:
Hi all,
I try use golden cursor.
 
I have a script it's a file.gc
 
But I not find where I can import file.gc for my application.
 
it's for game heartstone.
the file for golden cursor is heartstone.gc
 
Thanks!


Re: About Tesseract OCR.

Rui Fontes
 

Hola Javi!


Firstly, thanks by your PR!


But, I would like to better it a litle more...

The case is:

When I have set this new laptop and installed Dropbox, I have selected to backup the desktop folder, and so my desktop full path is:

c:\Users\userName\dropbox\ambiente de trabalho

"Ambiente de trabalho" is the portuguese expression for "Desktop"...


So, I have tried to use shlobj.getKnownFolderId to get the correct desktop path for all cases...

In spite of modifying the shlobj.ini and importing it in the add-on, I didn't manage to do it...


I have added in shlobj.py, on the

class FolderId(str, Enum):

the following lines:

    #Desktop folder
    # The typical path is "C:\Users\Utilizador\appData\desktop
    APP_DATA_DESKTOP = "{B2C5E279-7ADD-439F-B28C-C41FE1BBF672}"

the string between quotes was found at:

https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid"""


Someone can help on this?


Best regards,

Rui Fontes
NVDA portuguese team



Às 17:59 de 11/06/2022, Javi Domínguez escreveu:

Hello.


You have a pull request that fixes both issues.


https://github.com/ruifontes/tesseractOCR/pull/2


Greetings


Javi Dominguez



El 05/06/2022 a las 23:01, Javi Domínguez via groups.io escribió:
Hello again.

I have run wia-cmd-scanner.exe directly from the command line, in the Windows CMD, and it has worked perfectly.

However from the addon it doesn't work. stderr shows:

b'The system cannot find the specified path.\r\n'

I hope this helps. It's late and I can't do any more research. Tomorrow dawns very early.

Good nitht

Javi

El 05/06/2022 a las 22:24, Javi Domínguez via groups.io escribió:
Hello.


* It is a limitation of the routine to get the complete path of the file...

If you can help bettering the routine, I will be glad!

OK. I'll take a look at that.


* The scanner is recognized as WIA compatible?

what do you mean with "is recognized as WIA compatible"? Yes, the scanner is WIA compliant, other apps recognize it but the addon I don't know, it just doesn't do anything.


* What Windows version?
Windows 10 21H2 (x64) build 19044.1706


* So, I should name each thread differently...

Yes, it would be convenient.


* And, before starting another thread, verify if it is active, right?

I think so. I would wait for the current thread to finish before starting another.


Note that if you assign the new thread to self._thread, the old thread will continue to run until it finishes but you will no longer have a reference to it. You will only be able to access it via threading.enumerate().


You may need a method to kill threads that are stuck or taking too long.


Greetings


Javi


El 05/06/2022 a las 20:34, Rui Fontes escribió:
Hola Javi!


Comments in midle of your message marked with *...


Às 18:47 de 05/06/2022, Javi Domínguez escreveu:
When I try to recognize a file on the desktop two things happen:

1. If this is the first time a file is recognized, it says "file not supported" (tested with PDF and BMP file types). The same file recognized from a folder in Windows explorer works fine.

* It is a limitation of the routine to get the complete path of the file...

If you can help bettering the routine, I will be glad!



2. If another file has been recognized before, it process any file even if it is not of a supported type. In any case, supported type or not, it always shows the result of the previous recognition, not the requested file. Even after manually deleting the oc.txt and ocr-xxx.png files from the addon's images folder, it re-processes the previously requested file.

* It was an error on code... The path of last document was not cleared, so list of ocr-xxx.png file was created again...



On the other hand, recognition from scanner does not work for me. My scanner is HP Scanjet G2410, It may not be supported but the addon does not speak any message about it. The thread that processes this remains active and never terminates. If the script is executed again, another thread is launched that also remains active and so on forever. It is normal for the user, if he does not receive a response, to try to run it again, so you can end up with a lot of active threads.
* The scanner is recognized as WIA compatible?

* What Windows version?


I have the habit of naming the treads that I use to be able to debug better with threading.enumerate(). I have added the line to __init__.py
self._thread.name = "tesseractOCR"
before starting the thread to do these tests.
* So, I should name each thread differently...

* And, before starting another thread, verify if it is active, right?


finally, in terms of user experience, I think you need to give more information about what is happening. Sometimes, if the recognition takes time, the user does not know if it is working correctly or not.
* It is schedulled for next version...


Thanks!


Rui Fontes















Re: NVDA Dev & Test Toolbox #addonrequestreview

Noelia Ruiz
 

Hi Cyrille, thanks for including this add-on on the website.
In case you don't receive GitHub notifications for issues, I inform
you here: I've created three issues on your GitHub repo.
Cheers

2022-06-18 23:30 GMT+02:00, Cyrille via groups.io
<cyrille.bougot2@...>:

Hi all

Thanks for the feedback.
Since the add-on seems to interest at least a few people, I will definitely
ask its inclusion on the community website.
Beforehand, I have to take into account some of the remarks; special thanks
to Lukasz for all these points with details.

Some other points will be included later, e.g. the GUI to choose the
function to patch that I had already in mind.

Cheers,

Cyrille






Re: golden cursor problem

Ibrahim Hamadeh
 

Hi,
The file.gc should be constructed by goldenCursor addon.
it is just a file to preserve the positions of the mouse in specific application.
So if you mean that your file, heartstone.gc
has been created by another instance of goldenCursor addon, and you want to include it in your current addon
Really goldenCursor does not have an import feature
So, you have to copy the file heartstone.gc
then enter the folder of goldenCursor addon
in the root folder of the addon, meaning this folder
you may find a folder named mousePositions
now enter it, and paste your .gc file in it.
If you did not find the folder named mousePositions
then that means, you haven't yet save any positions using the addon
Try to save one positions for any program, say notepad for instance
after that the folder mousePositions, will show up, and you can paste your file in it.
Then restart NVDA, and go on.
 regards
 
 ibrahim

On 6/18/2022 11:05 AM, leglaude wrote:
Hi all,
I try use golden cursor.
 
I have a script it's a file.gc
 
But I not find where I can import file.gc for my application.
 
it's for game heartstone.
the file for golden cursor is heartstone.gc
 
Thanks!


Re: NVDA Dev & Test Toolbox #addonrequestreview

Cyrille
 

Hi all

Thanks for the feedback.
Since the add-on seems to interest at least a few people, I will definitely ask its inclusion on the community website.
Beforehand, I have to take into account some of the remarks; special thanks to Lukasz for all these points with details.

Some other points will be included later, e.g. the GUI to choose the function to patch that I had already in mind.

Cheers,

Cyrille


Re: NVDA Dev & Test Toolbox #addonrequestreview

Lukasz Golonka
 

Cyrille,

Many thanks for making this very useful add-on more official than it was!
While I'm using some parts of it pretty regularly I never had time to
look at the code, or to familiarize myself with all its features. Some
review points below:

- In the beepError file you may consider using globalVars.appDir if it
is defined when creating path to the error sound. That would allow
people on never versions of NVDA who are using Ivona SAPI voices (they
tent to change CWD when loading them for the first time) to have the
sound played.
- in the myHandle function there is unnecessary import of api
- in the fileOpener when retrieving path to the nVDA source, and when
user is running a source build you're setting the path to
globalVars.appDir even for versions of NVDA where it is not yet
implemented. An alternative approach which would handle the case where
CWD has been changed to something silly would be to return
__main__.__file__ in such case.
- In the logReader classes such as LogMessageHeader and LogMessage don't
inherit from object - this causes them to be old style classes under
Python 2. While I cannot point out any real issues due to this in code
which targets both Python 2 and 3 it is better to inherit from object
explicitly.
- In the makeFromTextInfo method you're raising NotImplemented instead of
NotImplementedError - this is a common Python gotcha NotImplemented
cannot be raised it is a singleton returned when the given class does not
support a particular arithmetic operation on the provided argument.
- Not an error as such but when checking if the given window is the log
viewer you can avoid comparing window names by checking if the window
handle equals gui.logViewer.logViewer.GetHandle() (don't forget to
handle the case where log viewer is not yet initialized or closed).
- It is unclear to me why you're setting directory to None in the
restartWithOptions for Python 2 versions of NVDA, so a comment in code
here would be nice to have.
- The design of the restartWithOptions is... shall we say, suboptimal:
- The OPTION-LIST would greatly benefit from usages of named tuples, so
that you do not need to remember what indexes for the given suboptions
are
- Since each option has a type of allowed values you may avoid these
extended isinstance checks, implement a method called createControls or
similar for each of the classes such as FolderStr, and use polymorphism
to create the control for each of the options.
- If the default value is neither FolderStr nor FileStr you're using a
bare raise statement effectively throwing whatever exception would be
returned by sys.exc_info at this point - that is almost certainly not
what you want to do - when I've done this for testing I got exception
from the touchHandler as my machine is not touch capable.
- In the script_toggleStackTraceLog _originalFunction does not need to
be defined as global
- While certainly not something to implement for this version it would
be interesting to introduce a gui for specifying what function should be
patched for stack tracing.
- I have some reservations about the way in which compatibility for
controlTypes is handled. Essentially it is never a good idea to modify
the original module with the new code unless you have to monkey patch it.
Additionally more and more add-ons seems to add their own implementation
of controlTypes.Role and controlTypes.State and it is only a matter of
time when, depending on the order in which add-ons are loaded some
implementation becomes incompatible with whatever the next add-on
decided to implement causing no end of troubles. For an alternative,
much safer, implementation, you can take a look at my add-on for Becky!
in particular class ControlTypesCompatWrapper. It does not support
output reasons, but adding them should be trivial.


--
Regards
Lukasz


Dropbox tray gone inaccessible again

Brian's Mail list account
 

Is the author of the dropbox add on here?
At the moment no alerts are given when a shared folder is changed and the normal menu off of the dropbox tray icon no longer operates, bringing up a tray assistant window apparently with nothing inside it. I just don't get how they can get it so wrong. Maybe if anyone has any contacts at Dropbox you could alert them to this regression. Thanks.
Brian

--
bglists@...
Sent via blueyonder.(Virgin media)
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.


Re: NVDA Dev & Test Toolbox #addonrequestreview

Luke Davis
 

Cyrille via groups.io wrote:

According to people's feedback, i.e. if people think that this add-on can be useful, I will open a PR myself against addonFiles to request its integration
in the community website.
Please do. I have not installed it yet, but based on its description I will be definitely installing it soon.

I have an add-on called Debug Helper, then renamed to Dev Helper, for which I had some similar plans, but not nearly so extensive. I got off on other projects, and never developed it to where I wanted.

I had decided that I would probably discontinue that one rather than work on it further, and seeing this one of yours has confirmed that decision.

I look forward to using Dev & Test Toolbox, and hope you do decide to submit to the community site.

Luke


golden cursor problem

leglaude
 

Hi all,
I try use golden cursor.
 
I have a script it's a file.gc
 
But I not find where I can import file.gc for my application.
 
it's for game heartstone.
the file for golden cursor is heartstone.gc
 
Thanks!


Re: NVDA Dev & Test Toolbox #addonrequestreview

Brian's Mail list account
 

and I never saw any of them!

Guess it depends on settings in the reader.
Brian

--
bglists@...
Sent via blueyonder.(Virgin media)
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

----- Original Message -----
From: "Travis Roth" <travis@...>
To: <nvda-addons@nvda-addons.groups.io>
Sent: Saturday, June 18, 2022 2:29 AM
Subject: Re: [nvda-addons] NVDA Dev & Test Toolbox #addon #add-on #addonregistration #addonrelase #addonrelease #addonrelesae #addonrelese #addonrequest #addonrequestreview #addonreview #addon-review #addonreviewrequest #addons #addonsgithuborganization #addontest


Hashtags?

Cyrille’s message with the documentation is in excellent condition for me with nice formatting even.

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Noelia Ruiz
Sent: Friday, June 17, 2022 6:38 PM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] NVDA Dev & Test Toolbox #addon #add-on #addonregistration #addonrelase #addonrelease #addonrelesae #addonrelese #addonrequest #addonrequestreview #addonreview #addon-review #addonreviewrequest #addons #addonsgithuborganization #addontest



Hi Cyrille:



I"ll look at this add-on and, if needed, I"ll open issues on GitHub.

PS: for any reason, your message appears with a lot of hashtags, maybe due to autocompletion tools or something. I"ll try to edit the subject since it"s anoying to read them.

Cheers

Enviado desde mi iPhone





El 18 jun 2022, a las 0:12, Cyrille via groups.io <cyrille.bougot2@... <mailto:cyrille.bougot2@...> > escribió:





Hello all

I am glad to share with you my add-on NVDA Dev & Test Toolbox.
The documentation is under my signature.
Direct download link: https://github.com/CyrilleB79/NVDA-Dev-Test-Toolbox/releases/download/V2.0/nvdaDevTestToolbox-2.0.nvda-addon

The add-on is not totally new but I had never advertised so much about it. If you find some issue or want to make feedback, do not hesitate, replying to this message or on the GitHub repo <https://github.com/CyrilleB79/NVDA-Dev-Test-Toolbox> .
I plan to submit it for the community website if it interests people. As the name indicates, the audience target for this add-on are people developing or testing NVDA or its add-ons.
Let me know what you think.

Cheers,

Cyrille


NVDA Dev & Test Toolbox


* Author: Cyrille Bougot
* NVDA compatibility: 2019.2 and beyond
* Download stable version <https://addons.nvda-project.org/files/get.php?file=ndtt>

This add-on gathers various features for NVDA debugging and testing.





Features


* An enhanced restart dialog to specify some extra options when restarting NVDA.
* A toggle script and a backport of NVDA's "Play a sound for logged errors" feature.
* An object property explorer.
* An extended script description mode: when enabled input help mode report information on scripts that have no description.
* Commands to help log reading and analyzing.
* In the Python console workspace, a function to open the source code of an object.
* A command to log the stack trace of the speech.speak function.





Enhanced restart dialog


The NVDA+shift+Q command opens a dialog to specify some extra options before restarting NVDA. The options that can be specified correspond to the command line options <https://www.nvaccess.org/files/nvda/documentation/userGuide.html#CommandLineOptions> that can be used with nvda.exe, e.g. -c for config path, --disable-addons to disable add-ons, etc.





Play a sound for logged errors


The <https://www.nvaccess.org/files/nvda/documentation/userGuide.html#PlayErrorSound> "Play a sound for logged errors" setting has been introduced in NVDA 2021.3 and allows to specify if NVDA will play an error sound in case an error is logged.

This add-on provides an additional command (NVDA+control+alt+E) to toggle this setting. You can choose:

* "Only in test versions" (default) to make NVDA play error sounds only if the current NVDA version is a test version (alpha, beta or run from source).
* "Yes" to enable error sounds whatever your current NVDA version is.

For NVDA prior to 2021.3, this add-on provides the backport of this feature and the possibility to control it with the keyboard command. The checkbox in the Advanced settings panel is not backported however.





Object property explorer


This feature allows to report some properties of the current navigator object without opening the log viewer.

To list the properties of an object, move the navigator object to it and use the following commands:

* NVDA+Shift+LeftArrow or NVDA+Shift+RightArrow: select previous or next property and announce it for the navigator object.
* NVDA+LeftArrow : Announce the navigator object's currently selected property.

The list of the supported properties is the following: name, role, state, value, windowClassName, windowControlID, windowHandle, location, Python class, Python class mro.

This feature is an improvement of NVDA developer guide <https://www.nvaccess.org/files/nvda/documentation/userGuide.html#CommandLineOptions> example 3

If you have installed Speech history review and copying <https://addons.nvda-project.org/addons/speech_history.en.html> add-on from Tyler Spivey and James Scholes, you may use it to copy and paste the announced property to review it. Review via copy/paste is especially useful for pythonClassMRO since it may be long.





Extended script description mode


When the Extended script description mode is active, the input help mode (NVDA+1) is modified as follows. If a script has no description, the script's name and class are reported. If a script has a description, its description is reported as usual. The gesture to activate or deactivate this feature is NVDA+control+alt+D.

Executing a gesture bound to a script without description in input help mode also create an entry for this script in the gesture management dialog. This entry is located in a dedicated category called "Scripts without description (modify at your own risk!)". This allow to easily add, delete or change the native NVDA gestures for these script. Be aware however that it is often intended that such script do not have any description to prevent the user to modify the associated gesture. Indeed, the gesture may be defined to match an application shortcut key. For example the script script_toggleItalic on NVDAObjects.window.winword.WordDocument is bound to control+I and this should not be modified since the gesture is passed to the application to actually execute the shortcut key.





Usage example


Control+shift+I also toggle italic in Word, even if it is not natively reported by NVDA. To have the control+shift+I result reported by NVDA as control+I, you should perform the following steps:

* Open a Word document.
* Enable the extended script description mode with NVDA+control+alt+D.
* Enter input help mode with NVDA+1.
* Press control+I to report the italic script and have it added in the gesture dialog.
* Exit input help mode with NVDA+1.
* Open the input gestures dialog.
* In the category "Scripts without description (modify at your own risk!)", select the command "toggleItalic on NVDAObjects.window.winword.WordDocument".
* Add the control+shift+I shortcut and validate.
* If you want, exit the extended script description mode with NVDA+control+alt+D.

Known bug: A script added for a specific class is visible even if gesture manager is opened in another context.





Log reading and analyzing commands


A log reader mode provides commands to ease log reading and analyzing. In the log viewer window the log reader is enabled by default, thus log reading commands are available immediately. In another text reading area such as an editor (e.g. Notepad++) or a webpage (e.g. GitHub issue), you need to press NVDA+control+alt+L to enable log reader mode and use its commands. When you are done with log reading and analyzing tasks, you can disable again NVDA+control+alt+L to disable the log reader mode.

The commands available in log reader mode are described hereafter.





Quick navigation commands


Single letter command similar to browse mode quick navigation keys allow to move to various type of log messages:

* m: any message
* e: ERROR
* i: IO
* d: DEBUG
* f: INFO
* g: DEBUGWARNING
* w: WARNING

Pressing the single letter moves to the next occurrence of this message. Combining the letter with the shift key moves to the previous occurrence of this message.





Opening a file in your editor


When looking at a traceback, you may want to open one of the source files to understand the cause and the context of the issue. Press C to open the source code file corresponding to the current line of the traceback.

For this feature to work, you need to have configured your favorite editor's command. If you are not running NVDA from source, the location of NVDA source code also should have been configured. For more details regarding the configuration, please see the paragraph NVDA Debug & Test Tools configuration.





Python console extension


In the console, you can call the following function to view the source code that defines the variable myVar:
openCodeFile(myVar)

For this feature to work, you need to have configured your favorite editor's command. If you are not running NVDA from source, the location of NVDA source code also should have been configured. For more details regarding the configuration, please see the paragraph NVDA Debug & Test Tools configuration.

The openCodeFile functions can be called on objects defined in NVDA's code or on objects defined by add-ons. It cannot be called on objects whose source code is not available such as python builtins.

Below are examples of call in NVDA's code:

* View the definition of the function speech.speech.speak:
openCodeFile(speech.speech.speak)
* View the definition of the class TextInfo:
openCodeFile(textInfos.TextInfo)
* View the definition of the method copyToClipboard of the class TextInfo:
openCodeFile(textInfos.TextInfo.copyToClipboard)
* View the class definition of the focused object:
openCodeFile(focus)
* Open the file api.py defining the module api:
openCodeFile(api)





Log the stack trace of the speech function


Sometimes, you may want to see which part of the code is responsible for speaking something. For this, you can enable the stack trace logging of the speech function pressing NVDA+control+alt+S. Each time NVDA speaks, a corresponding stack trace will be logged in the log.

Note: You may modify the script's file directly to patch another function. See all instructions in the file for details on usage.





NVDA Debug & Test Tools configuration


The log reader commands and the python console extension feature may require a specific configuration. To use functions that allow to view source code in your editor, you should first configure your editor's command line. If NVDA's file need to be viewed and if you are not running from source, you also need to configure NVDA's source code path.





Editor's command line configuration


To use the 'open source code' command or the openCodeFile console command, you need first to configure the command that will be called to open the file in your favorite editor. For this, open the NVDA console (NVDA+control+Z) and type the following line and then Enter: config.conf['ndtt']['sourceFileOpener'] = r'"C:\path\to\my\editor\editor.exe" "{path}":{line}' You should of course modify this line according to the real name and location of your editor and the syntax used by it to open files. {path} will be replaced by the full path of the file to open and {line} by the line number where you want the cursor to be set. For Notepad++ for example the command to type in the console would be: config.conf['ndtt']['sourceFileOpener'] = r'"C:\Program Files\Notepad++\notepad++.exe" {path} -n{line}'





NVDA source code path configuration


When a file belonging to NVDA's core is listed in the traceback, the line is of the following form: File "config\profileUpgrader.pyc", line 30, in upgrade

If you are not running NVDA from source, you may specify an alternate location where the source file will be found, e.g. the place where you have cloned NVDA source files. In this case, you have to configure the path where you have NVDA source files located.

For this, open the NVDA console (NVDA+control+Z) and type the following line and then Enter: config.conf['ndtt']['nvdaSourcePath'] = r'C:\pathExample\GIT\nvda\source' Of course, replace the path of NVDA source with the correct one.

Be sure however that the version of your source file (e.g. GIT commit) is the same as the one of the running instance of NVDA.





Change log





Version 2.0


* New feature: Enhanced restart dialog to specify some extra options when restarting NVDA.
* New feature: extended description mode.
* Play error sound feature harmonized between pre and post 2021.3 versions of NVDA.
* New feature: Log reader commands are now available in the log viewer and also optionally in edit fields or webpages.
* New feature: In the Python console, an openCodeFile function is available to view the source code of an object.
* Some features are now disabled in secure mode for security reasons.
* The add-on's compatibility range has been extended (from 2019.2 to 2021.1).
* Releases are now performed with GitHub action instead of appVeyor.





Version 1.0


* Initial release.



*


Re: Investigation: possible approach to sign add-ons with GPG

Brian's Mail list account
 

That means then, that anyone, for example changing the manifest file only would make it obvious with some kind of error if he/she shared the file containing that altered file.
Brian

--
bglists@...
Sent via blueyonder.(Virgin media)
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.

----- Original Message -----
From: "Noelia Ruiz" <nrm1977@...>
To: <nvda-addons@nvda-addons.groups.io>
Sent: Friday, June 17, 2022 4:18 PM
Subject: Re: [nvda-addons] Investigation: possible approach to sign add-ons with GPG


Hello:

The proposal in the mentioned issue do not suggest that not signed
add-ons won't work. Otherwise, it's proposed as a possible optional
feature to check that the origin of add-ons using this is aucthentic.
This can help to check that the add-on hasn't been altered, for
example, we shouldn't send an add-on and later use the same URL to
provide a different version of the same add-on, and mechanisms like
gpg can also provide a way to verify the identity of the person who
signed the add-on, for example, now I can say that the aucthor of an
add-on is Brian, but signatures allow to check that someone has marked
the add-on as signed via a private key owned by this person.
GPG can use a pair of keys: a private key used to provide signatures,
and a public key associated with this private key. The private key
cannot be inferred from the public key, but the public key is
associated to the private key. So you can sign add-ons (or commits and
tags on GitHub, etc.) using your private key, and people can use your
public key to ensure that the signature cames from you, and
verifications maybe done automatically on servers like the add-ons
datastore, like done on GitHub if we sign commits or tags providing a
public key on our GitHub account.
These two faqs maybe useful:

7.1 What’s ‘public-key cryptography’?
In the 1970s new ideas came to the forefront of the cryptanalytic
world. One of the most important was the development of asymmetric
cryptography (also often called “public-key cryptography”).
Asymmetric cryptography is built around problems that are very hard in
one direction, and very easy in another. Consider the number 2,701. If
you were to be asked for its prime factors, you would find it a
daunting challenge. If you were to be given the numbers 37 and 73,
though, it wouldn’t take but a minute to discover the answer was
2,701. Multiplying two numbers to yield a third number is easy:
finding those two numbers, given the third, is hard.
Asymmetric cryptography uses these asymmetric problems as the
building-blocks of cryptography. It’s easy to create an encrypted
message which neither you nor anyone else save the intended recipient
can decrypt. To continue the metaphor, you and everyone else get to
wrestle with the hard problem (“factor 2,701”). The intended recipient
knows a secret piece of information which makes the problem easy
(“factor 2,701, given that one of the factors is 73”).
This manages to overcome the major flaw with symmetric cryptography.
Your public key can be shared with the entire world, even your
enemies, and your communications will still be secure. Compare this to
symmetric cryptography, where as soon as the key became public
knowledge the entire system was broken.

8.19 How can I use GnuPG to verify a file I’ve downloaded?
1.
Get a copy of the author’s public certificate and import it to your
keyring. It’s important to get the author’s certificate through a
trusted source. On the internet, anyone can be pretend to be anyone.
Particularly, be careful if the certificate you have doesn’t match the
one used for prior code releases.
2.
Once you’re confident you have the correct certificate, give it a
local signature. Assuming you want to locally sign certificate
1DCBDC01B44427C7, you’d type:
gpg --edit-key 1DCBDC01B44427C7 lsign
3.
Download the software package. Let’s assume it’s called “foo.zip”.
4.
Download the detached signature for the package. Let’s assume it’s
called “foo.zip.asc”.
5.
Run:
gpg foo.zip.asc
GnuPG will assume the original file is in foo.zip. (If GnuPG can’t
find foo.zip, GnuPG will prompt you for the name of the original
package.) If all goes well, GnuPG will report good signatures and you
may be confident you’ve received the package as the author intended.
Please note that a good signature doesn’t mean a piece of software is
trustworthy, reliable, or bug-free. It just means nobody tampered with
it and you’re receiving it as the author intends. Keep a healthy dose
of skepticism, and remember that cryptography cannot save us from our
own foolishness.

Faqs are available at
https://www.gnupg.org/faq/gnupg-faq.html


2022-06-17 10:39 GMT+02:00, Brian's Mail list account via groups.io
<bglists@...>:
For those of us who do not know, what is this, and how does it help? Are we

proposing that an add on not signed will not be allowed to run?
This could be counter productive.
Brian

--
bglists@...
Sent via blueyonder.(Virgin media)
Please address personal E-mail to:-
briang1@..., putting 'Brian Gaff'
in the display name field.
----- Original Message -----
From: "Noelia Ruiz" <nrm1977@...>
To: <nvda-addons@nvda-addons.groups.io>
Sent: Friday, June 17, 2022 5:35 AM
Subject: [nvda-addons] Investigation: possible approach to sign add-ons with

GPG


Hello:

I find useful and interesting this issue for the planned add-on
datastore:

Ensure add-on release origin is authentic:
https://github.com/nvaccess/addon-datastore/issues/41

I started to sign some .nvda-addon binaries locally, but this was
tedious. Today, for testing, I've used successfully the "Import gpg"
action available on GitHub to sign the binary on GitHub, not locally.
In case someone has suggestions or feedback, you may comment on the
add-on datastore issue or here. I've provided the following links on
the issue:

- manualRelease workflow: a .yaml file used to release add-ons
providing its version and if it's or not a prerelease:
https://github.com/nvdaes/clipContentsDesigner/blob/main/.github/workflows/manualRelease.yaml
- import gpg action:
https://github.com/marketplace/actions/import-gpg
- Release of clipContentsDesigner add-on for testing (containing the
.sig and publicKey.asc files:
https://github.com/nvdaes/clipContentsDesigner/releases/tag/testGpg16.0.0-dev

Cheers










Re: NVDA Dev & Test Toolbox #addonrequestreview

Akash Kakkar
 

Really a fantastic addon.

Kudos for this to you bro, really amazing.

Will be very useful for me

On 6/18/2022 3:42 AM, Cyrille via groups.io wrote:
 

Hello all

I am glad to share with you my add-on NVDA Dev & Test Toolbox.
The documentation is under my signature.
Direct download link: https://github.com/CyrilleB79/NVDA-Dev-Test-Toolbox/releases/download/V2.0/nvdaDevTestToolbox-2.0.nvda-addon

The add-on is not totally new but I had never advertised so much about it. If you find some issue or want to make feedback, do not hesitate, replying to this message or on the GitHub repo.
I plan to submit it for the community website if it interests people. As the name indicates, the audience target for this add-on are people developing or testing NVDA or its add-ons.
Let me know what you think.

Cheers,

Cyrille

NVDA Dev & Test Toolbox

  • Author: Cyrille Bougot
  • NVDA compatibility: 2019.2 and beyond
  • Download stable version

This add-on gathers various features for NVDA debugging and testing.

 

Features

  • An enhanced restart dialog to specify some extra options when restarting NVDA.
  • A toggle script and a backport of NVDA's "Play a sound for logged errors" feature.
  • An object property explorer.
  • An extended script description mode: when enabled input help mode report information on scripts that have no description.
  • Commands to help log reading and analyzing.
  • In the Python console workspace, a function to open the source code of an object.
  • A command to log the stack trace of the speech.speak function.

 

Enhanced restart dialog

The NVDA+shift+Q command opens a dialog to specify some extra options before restarting NVDA. The options that can be specified correspond to the command line options that can be used with nvda.exe, e.g. -c for config path, --disable-addons to disable add-ons, etc.

 

Play a sound for logged errors

The "Play a sound for logged errors" setting has been introduced in NVDA 2021.3 and allows to specify if NVDA will play an error sound in case an error is logged.

This add-on provides an additional command (NVDA+control+alt+E) to toggle this setting. You can choose:

  • "Only in test versions" (default) to make NVDA play error sounds only if the current NVDA version is a test version (alpha, beta or run from source).
  • "Yes" to enable error sounds whatever your current NVDA version is.

For NVDA prior to 2021.3, this add-on provides the backport of this feature and the possibility to control it with the keyboard command. The checkbox in the Advanced settings panel is not backported however.

 

Object property explorer

This feature allows to report some properties of the current navigator object without opening the log viewer.

To list the properties of an object, move the navigator object to it and use the following commands:

  • NVDA+Shift+LeftArrow or NVDA+Shift+RightArrow: select previous or next property and announce it for the navigator object.
  • NVDA+LeftArrow : Announce the navigator object's currently selected property.

The list of the supported properties is the following: name, role, state, value, windowClassName, windowControlID, windowHandle, location, Python class, Python class mro.

This feature is an improvement of NVDA developer guide example 3

If you have installed Speech history review and copying add-on from Tyler Spivey and James Scholes, you may use it to copy and paste the announced property to review it. Review via copy/paste is especially useful for pythonClassMRO since it may be long.

 

Extended script description mode

When the Extended script description mode is active, the input help mode (NVDA+1) is modified as follows. If a script has no description, the script's name and class are reported. If a script has a description, its description is reported as usual. The gesture to activate or deactivate this feature is NVDA+control+alt+D.

Executing a gesture bound to a script without description in input help mode also create an entry for this script in the gesture management dialog. This entry is located in a dedicated category called "Scripts without description (modify at your own risk!)". This allow to easily add, delete or change the native NVDA gestures for these script. Be aware however that it is often intended that such script do not have any description to prevent the user to modify the associated gesture. Indeed, the gesture may be defined to match an application shortcut key. For example the script script_toggleItalic on NVDAObjects.window.winword.WordDocument is bound to control+I and this should not be modified since the gesture is passed to the application to actually execute the shortcut key.

 

Usage example

Control+shift+I also toggle italic in Word, even if it is not natively reported by NVDA. To have the control+shift+I result reported by NVDA as control+I, you should perform the following steps:

  • Open a Word document.
  • Enable the extended script description mode with NVDA+control+alt+D.
  • Enter input help mode with NVDA+1.
  • Press control+I to report the italic script and have it added in the gesture dialog.
  • Exit input help mode with NVDA+1.
  • Open the input gestures dialog.
  • In the category "Scripts without description (modify at your own risk!)", select the command "toggleItalic on NVDAObjects.window.winword.WordDocument".
  • Add the control+shift+I shortcut and validate.
  • If you want, exit the extended script description mode with NVDA+control+alt+D.

Known bug: A script added for a specific class is visible even if gesture manager is opened in another context.

 

Log reading and analyzing commands

A log reader mode provides commands to ease log reading and analyzing. In the log viewer window the log reader is enabled by default, thus log reading commands are available immediately. In another text reading area such as an editor (e.g. Notepad++) or a webpage (e.g. GitHub issue), you need to press NVDA+control+alt+L to enable log reader mode and use its commands. When you are done with log reading and analyzing tasks, you can disable again NVDA+control+alt+L to disable the log reader mode.

The commands available in log reader mode are described hereafter.

 

Quick navigation commands

Single letter command similar to browse mode quick navigation keys allow to move to various type of log messages:

  • m: any message
  • e: ERROR
  • i: IO
  • d: DEBUG
  • f: INFO
  • g: DEBUGWARNING
  • w: WARNING

Pressing the single letter moves to the next occurrence of this message. Combining the letter with the shift key moves to the previous occurrence of this message.

 

Opening a file in your editor

When looking at a traceback, you may want to open one of the source files to understand the cause and the context of the issue. Press C to open the source code file corresponding to the current line of the traceback.

For this feature to work, you need to have configured your favorite editor's command. If you are not running NVDA from source, the location of NVDA source code also should have been configured. For more details regarding the configuration, please see the paragraph NVDA Debug & Test Tools configuration.

 

Python console extension

In the console, you can call the following function to view the source code that defines the variable myVar:
openCodeFile(myVar)

For this feature to work, you need to have configured your favorite editor's command. If you are not running NVDA from source, the location of NVDA source code also should have been configured. For more details regarding the configuration, please see the paragraph NVDA Debug & Test Tools configuration.

The openCodeFile functions can be called on objects defined in NVDA's code or on objects defined by add-ons. It cannot be called on objects whose source code is not available such as python builtins.

Below are examples of call in NVDA's code:

  • View the definition of the function speech.speech.speak:
    openCodeFile(speech.speech.speak)
  • View the definition of the class TextInfo:
    openCodeFile(textInfos.TextInfo)
  • View the definition of the method copyToClipboard of the class TextInfo:
    openCodeFile(textInfos.TextInfo.copyToClipboard)
  • View the class definition of the focused object:
    openCodeFile(focus)
  • Open the file api.py defining the module api:
    openCodeFile(api)

 

Log the stack trace of the speech function

Sometimes, you may want to see which part of the code is responsible for speaking something. For this, you can enable the stack trace logging of the speech function pressing NVDA+control+alt+S. Each time NVDA speaks, a corresponding stack trace will be logged in the log.

Note: You may modify the script's file directly to patch another function. See all instructions in the file for details on usage.

 

NVDA Debug & Test Tools configuration

The log reader commands and the python console extension feature may require a specific configuration. To use functions that allow to view source code in your editor, you should first configure your editor's command line. If NVDA's file need to be viewed and if you are not running from source, you also need to configure NVDA's source code path.

 

Editor's command line configuration

To use the 'open source code' command or the openCodeFile console command, you need first to configure the command that will be called to open the file in your favorite editor. For this, open the NVDA console (NVDA+control+Z) and type the following line and then Enter: config.conf['ndtt']['sourceFileOpener'] = r'"C:\path\to\my\editor\editor.exe" "{path}":{line}' You should of course modify this line according to the real name and location of your editor and the syntax used by it to open files. {path} will be replaced by the full path of the file to open and {line} by the line number where you want the cursor to be set. For Notepad++ for example the command to type in the console would be: config.conf['ndtt']['sourceFileOpener'] = r'"C:\Program Files\Notepad++\notepad++.exe" {path} -n{line}'

 

NVDA source code path configuration

When a file belonging to NVDA's core is listed in the traceback, the line is of the following form: File "config\profileUpgrader.pyc", line 30, in upgrade

If you are not running NVDA from source, you may specify an alternate location where the source file will be found, e.g. the place where you have cloned NVDA source files. In this case, you have to configure the path where you have NVDA source files located.

For this, open the NVDA console (NVDA+control+Z) and type the following line and then Enter: config.conf['ndtt']['nvdaSourcePath'] = r'C:\pathExample\GIT\nvda\source' Of course, replace the path of NVDA source with the correct one.

Be sure however that the version of your source file (e.g. GIT commit) is the same as the one of the running instance of NVDA.

 

Change log

 

Version 2.0

  • New feature: Enhanced restart dialog to specify some extra options when restarting NVDA.
  • New feature: extended description mode.
  • Play error sound feature harmonized between pre and post 2021.3 versions of NVDA.
  • New feature: Log reader commands are now available in the log viewer and also optionally in edit fields or webpages.
  • New feature: In the Python console, an openCodeFile function is available to view the source code of an object.
  • Some features are now disabled in secure mode for security reasons.
  • The add-on's compatibility range has been extended (from 2019.2 to 2021.1).
  • Releases are now performed with GitHub action instead of appVeyor.

 

Version 1.0

  • Initial release.
 
  •  


Re: NVDA Dev & Test Toolbox #addonrequestreview

Noelia Ruiz
 

Thanks Cyrille: About opening issues on GitHub, I wanted to mean on your GitHub repo, so you can track reviews there. Cheers

Enviado desde mi iPhone

El 18 jun 2022, a las 7:59, Cyrille via groups.io <cyrille.bougot2@...> escribió:

Hi Noelia

According to people's feedback, i.e. if people think that this add-on can be useful, I will open a PR myself against addonFiles to request its integration in the community website.

Regarding the hashtags, I had only planned to put one of them. It seems that you have succeeded in removing them. Thanks!

Cheers,

Cyrille


On Fri, Jun 17, 2022 at 04:37 PM, Noelia Ruiz wrote:
Hi Cyrille:
 
I"ll look at this add-on and, if needed, I"ll open issues on GitHub.
PS: for any reason, your message appears with a lot of hashtags, maybe due to autocompletion tools or something. I"ll try to edit the subject since it"s anoying to read them.
Cheers

Enviado desde mi iPhone

El 18 jun 2022, a las 0:12, Cyrille via groups.io <cyrille.bougot2@...> escribió:

 

Hello all

I am glad to share with you my add-on NVDA Dev & Test Toolbox.
The documentation is under my signature.
Direct download link: https://github.com/CyrilleB79/NVDA-Dev-Test-Toolbox/releases/download/V2.0/nvdaDevTestToolbox-2.0.nvda-addon

The add-on is not totally new but I had never advertised so much about it. If you find some issue or want to make feedback, do not hesitate, replying to this message or on the GitHub repo.
I plan to submit it for the community website if it interests people. As the name indicates, the audience target for this add-on are people developing or testing NVDA or its add-ons.
Let me know what you think.

Cheers,

Cyrille

NVDA Dev & Test Toolbox

  • Author: Cyrille Bougot
  • NVDA compatibility: 2019.2 and beyond
  • Download stable version

This add-on gathers various features for NVDA debugging and testing.

 

Features

  • An enhanced restart dialog to specify some extra options when restarting NVDA.
  • A toggle script and a backport of NVDA's "Play a sound for logged errors" feature.
  • An object property explorer.
  • An extended script description mode: when enabled input help mode report information on scripts that have no description.
  • Commands to help log reading and analyzing.
  • In the Python console workspace, a function to open the source code of an object.
  • A command to log the stack trace of the speech.speak function.

 

Enhanced restart dialog

The NVDA+shift+Q command opens a dialog to specify some extra options before restarting NVDA. The options that can be specified correspond to the command line options that can be used with nvda.exe, e.g. -c for config path, --disable-addons to disable add-ons, etc.

 

Play a sound for logged errors

The "Play a sound for logged errors" setting has been introduced in NVDA 2021.3 and allows to specify if NVDA will play an error sound in case an error is logged.

This add-on provides an additional command (NVDA+control+alt+E) to toggle this setting. You can choose:

  • "Only in test versions" (default) to make NVDA play error sounds only if the current NVDA version is a test version (alpha, beta or run from source).
  • "Yes" to enable error sounds whatever your current NVDA version is.

For NVDA prior to 2021.3, this add-on provides the backport of this feature and the possibility to control it with the keyboard command. The checkbox in the Advanced settings panel is not backported however.

 

Object property explorer

This feature allows to report some properties of the current navigator object without opening the log viewer.

To list the properties of an object, move the navigator object to it and use the following commands:

  • NVDA+Shift+LeftArrow or NVDA+Shift+RightArrow: select previous or next property and announce it for the navigator object.
  • NVDA+LeftArrow : Announce the navigator object's currently selected property.

The list of the supported properties is the following: name, role, state, value, windowClassName, windowControlID, windowHandle, location, Python class, Python class mro.

This feature is an improvement of NVDA developer guide example 3

If you have installed Speech history review and copying add-on from Tyler Spivey and James Scholes, you may use it to copy and paste the announced property to review it. Review via copy/paste is especially useful for pythonClassMRO since it may be long.

 

Extended script description mode

When the Extended script description mode is active, the input help mode (NVDA+1) is modified as follows. If a script has no description, the script's name and class are reported. If a script has a description, its description is reported as usual. The gesture to activate or deactivate this feature is NVDA+control+alt+D.

Executing a gesture bound to a script without description in input help mode also create an entry for this script in the gesture management dialog. This entry is located in a dedicated category called "Scripts without description (modify at your own risk!)". This allow to easily add, delete or change the native NVDA gestures for these script. Be aware however that it is often intended that such script do not have any description to prevent the user to modify the associated gesture. Indeed, the gesture may be defined to match an application shortcut key. For example the script script_toggleItalic on NVDAObjects.window.winword.WordDocument is bound to control+I and this should not be modified since the gesture is passed to the application to actually execute the shortcut key.

 

Usage example

Control+shift+I also toggle italic in Word, even if it is not natively reported by NVDA. To have the control+shift+I result reported by NVDA as control+I, you should perform the following steps:

  • Open a Word document.
  • Enable the extended script description mode with NVDA+control+alt+D.
  • Enter input help mode with NVDA+1.
  • Press control+I to report the italic script and have it added in the gesture dialog.
  • Exit input help mode with NVDA+1.
  • Open the input gestures dialog.
  • In the category "Scripts without description (modify at your own risk!)", select the command "toggleItalic on NVDAObjects.window.winword.WordDocument".
  • Add the control+shift+I shortcut and validate.
  • If you want, exit the extended script description mode with NVDA+control+alt+D.

Known bug: A script added for a specific class is visible even if gesture manager is opened in another context.

 

Log reading and analyzing commands

A log reader mode provides commands to ease log reading and analyzing. In the log viewer window the log reader is enabled by default, thus log reading commands are available immediately. In another text reading area such as an editor (e.g. Notepad++) or a webpage (e.g. GitHub issue), you need to press NVDA+control+alt+L to enable log reader mode and use its commands. When you are done with log reading and analyzing tasks, you can disable again NVDA+control+alt+L to disable the log reader mode.

The commands available in log reader mode are described hereafter.

 

Quick navigation commands

Single letter command similar to browse mode quick navigation keys allow to move to various type of log messages:

  • m: any message
  • e: ERROR
  • i: IO
  • d: DEBUG
  • f: INFO
  • g: DEBUGWARNING
  • w: WARNING

Pressing the single letter moves to the next occurrence of this message. Combining the letter with the shift key moves to the previous occurrence of this message.

 

Opening a file in your editor

When looking at a traceback, you may want to open one of the source files to understand the cause and the context of the issue. Press C to open the source code file corresponding to the current line of the traceback.

For this feature to work, you need to have configured your favorite editor's command. If you are not running NVDA from source, the location of NVDA source code also should have been configured. For more details regarding the configuration, please see the paragraph NVDA Debug & Test Tools configuration.

 

Python console extension

In the console, you can call the following function to view the source code that defines the variable myVar:
openCodeFile(myVar)

For this feature to work, you need to have configured your favorite editor's command. If you are not running NVDA from source, the location of NVDA source code also should have been configured. For more details regarding the configuration, please see the paragraph NVDA Debug & Test Tools configuration.

The openCodeFile functions can be called on objects defined in NVDA's code or on objects defined by add-ons. It cannot be called on objects whose source code is not available such as python builtins.

Below are examples of call in NVDA's code:

  • View the definition of the function speech.speech.speak:
    openCodeFile(speech.speech.speak)
  • View the definition of the class TextInfo:
    openCodeFile(textInfos.TextInfo)
  • View the definition of the method copyToClipboard of the class TextInfo:
    openCodeFile(textInfos.TextInfo.copyToClipboard)
  • View the class definition of the focused object:
    openCodeFile(focus)
  • Open the file api.py defining the module api:
    openCodeFile(api)

 

Log the stack trace of the speech function

Sometimes, you may want to see which part of the code is responsible for speaking something. For this, you can enable the stack trace logging of the speech function pressing NVDA+control+alt+S. Each time NVDA speaks, a corresponding stack trace will be logged in the log.

Note: You may modify the script's file directly to patch another function. See all instructions in the file for details on usage.

 

NVDA Debug & Test Tools configuration

The log reader commands and the python console extension feature may require a specific configuration. To use functions that allow to view source code in your editor, you should first configure your editor's command line. If NVDA's file need to be viewed and if you are not running from source, you also need to configure NVDA's source code path.

 

Editor's command line configuration

To use the 'open source code' command or the openCodeFile console command, you need first to configure the command that will be called to open the file in your favorite editor. For this, open the NVDA console (NVDA+control+Z) and type the following line and then Enter: config.conf['ndtt']['sourceFileOpener'] = r'"C:\path\to\my\editor\editor.exe" "{path}":{line}' You should of course modify this line according to the real name and location of your editor and the syntax used by it to open files. {path} will be replaced by the full path of the file to open and {line} by the line number where you want the cursor to be set. For Notepad++ for example the command to type in the console would be: config.conf['ndtt']['sourceFileOpener'] = r'"C:\Program Files\Notepad++\notepad++.exe" {path} -n{line}'

 

NVDA source code path configuration

When a file belonging to NVDA's core is listed in the traceback, the line is of the following form: File "config\profileUpgrader.pyc", line 30, in upgrade

If you are not running NVDA from source, you may specify an alternate location where the source file will be found, e.g. the place where you have cloned NVDA source files. In this case, you have to configure the path where you have NVDA source files located.

For this, open the NVDA console (NVDA+control+Z) and type the following line and then Enter: config.conf['ndtt']['nvdaSourcePath'] = r'C:\pathExample\GIT\nvda\source' Of course, replace the path of NVDA source with the correct one.

Be sure however that the version of your source file (e.g. GIT commit) is the same as the one of the running instance of NVDA.

 

Change log

 

Version 2.0

  • New feature: Enhanced restart dialog to specify some extra options when restarting NVDA.
  • New feature: extended description mode.
  • Play error sound feature harmonized between pre and post 2021.3 versions of NVDA.
  • New feature: Log reader commands are now available in the log viewer and also optionally in edit fields or webpages.
  • New feature: In the Python console, an openCodeFile function is available to view the source code of an object.
  • Some features are now disabled in secure mode for security reasons.
  • The add-on's compatibility range has been extended (from 2019.2 to 2021.1).
  • Releases are now performed with GitHub action instead of appVeyor.

 

Version 1.0

  • Initial release.
 
  •  


Re: NVDA Dev & Test Toolbox #addonrequestreview

Cyrille
 

Hi Noelia

According to people's feedback, i.e. if people think that this add-on can be useful, I will open a PR myself against addonFiles to request its integration in the community website.

Regarding the hashtags, I had only planned to put one of them. It seems that you have succeeded in removing them. Thanks!

Cheers,

Cyrille


On Fri, Jun 17, 2022 at 04:37 PM, Noelia Ruiz wrote:
Hi Cyrille:
 
I"ll look at this add-on and, if needed, I"ll open issues on GitHub.
PS: for any reason, your message appears with a lot of hashtags, maybe due to autocompletion tools or something. I"ll try to edit the subject since it"s anoying to read them.
Cheers

Enviado desde mi iPhone

El 18 jun 2022, a las 0:12, Cyrille via groups.io <cyrille.bougot2@...> escribió:

 

Hello all

I am glad to share with you my add-on NVDA Dev & Test Toolbox.
The documentation is under my signature.
Direct download link: https://github.com/CyrilleB79/NVDA-Dev-Test-Toolbox/releases/download/V2.0/nvdaDevTestToolbox-2.0.nvda-addon

The add-on is not totally new but I had never advertised so much about it. If you find some issue or want to make feedback, do not hesitate, replying to this message or on the GitHub repo.
I plan to submit it for the community website if it interests people. As the name indicates, the audience target for this add-on are people developing or testing NVDA or its add-ons.
Let me know what you think.

Cheers,

Cyrille

NVDA Dev & Test Toolbox

  • Author: Cyrille Bougot
  • NVDA compatibility: 2019.2 and beyond
  • Download stable version

This add-on gathers various features for NVDA debugging and testing.

 

Features

  • An enhanced restart dialog to specify some extra options when restarting NVDA.
  • A toggle script and a backport of NVDA's "Play a sound for logged errors" feature.
  • An object property explorer.
  • An extended script description mode: when enabled input help mode report information on scripts that have no description.
  • Commands to help log reading and analyzing.
  • In the Python console workspace, a function to open the source code of an object.
  • A command to log the stack trace of the speech.speak function.

 

Enhanced restart dialog

The NVDA+shift+Q command opens a dialog to specify some extra options before restarting NVDA. The options that can be specified correspond to the command line options that can be used with nvda.exe, e.g. -c for config path, --disable-addons to disable add-ons, etc.

 

Play a sound for logged errors

The "Play a sound for logged errors" setting has been introduced in NVDA 2021.3 and allows to specify if NVDA will play an error sound in case an error is logged.

This add-on provides an additional command (NVDA+control+alt+E) to toggle this setting. You can choose:

  • "Only in test versions" (default) to make NVDA play error sounds only if the current NVDA version is a test version (alpha, beta or run from source).
  • "Yes" to enable error sounds whatever your current NVDA version is.

For NVDA prior to 2021.3, this add-on provides the backport of this feature and the possibility to control it with the keyboard command. The checkbox in the Advanced settings panel is not backported however.

 

Object property explorer

This feature allows to report some properties of the current navigator object without opening the log viewer.

To list the properties of an object, move the navigator object to it and use the following commands:

  • NVDA+Shift+LeftArrow or NVDA+Shift+RightArrow: select previous or next property and announce it for the navigator object.
  • NVDA+LeftArrow : Announce the navigator object's currently selected property.

The list of the supported properties is the following: name, role, state, value, windowClassName, windowControlID, windowHandle, location, Python class, Python class mro.

This feature is an improvement of NVDA developer guide example 3

If you have installed Speech history review and copying add-on from Tyler Spivey and James Scholes, you may use it to copy and paste the announced property to review it. Review via copy/paste is especially useful for pythonClassMRO since it may be long.

 

Extended script description mode

When the Extended script description mode is active, the input help mode (NVDA+1) is modified as follows. If a script has no description, the script's name and class are reported. If a script has a description, its description is reported as usual. The gesture to activate or deactivate this feature is NVDA+control+alt+D.

Executing a gesture bound to a script without description in input help mode also create an entry for this script in the gesture management dialog. This entry is located in a dedicated category called "Scripts without description (modify at your own risk!)". This allow to easily add, delete or change the native NVDA gestures for these script. Be aware however that it is often intended that such script do not have any description to prevent the user to modify the associated gesture. Indeed, the gesture may be defined to match an application shortcut key. For example the script script_toggleItalic on NVDAObjects.window.winword.WordDocument is bound to control+I and this should not be modified since the gesture is passed to the application to actually execute the shortcut key.

 

Usage example

Control+shift+I also toggle italic in Word, even if it is not natively reported by NVDA. To have the control+shift+I result reported by NVDA as control+I, you should perform the following steps:

  • Open a Word document.
  • Enable the extended script description mode with NVDA+control+alt+D.
  • Enter input help mode with NVDA+1.
  • Press control+I to report the italic script and have it added in the gesture dialog.
  • Exit input help mode with NVDA+1.
  • Open the input gestures dialog.
  • In the category "Scripts without description (modify at your own risk!)", select the command "toggleItalic on NVDAObjects.window.winword.WordDocument".
  • Add the control+shift+I shortcut and validate.
  • If you want, exit the extended script description mode with NVDA+control+alt+D.

Known bug: A script added for a specific class is visible even if gesture manager is opened in another context.

 

Log reading and analyzing commands

A log reader mode provides commands to ease log reading and analyzing. In the log viewer window the log reader is enabled by default, thus log reading commands are available immediately. In another text reading area such as an editor (e.g. Notepad++) or a webpage (e.g. GitHub issue), you need to press NVDA+control+alt+L to enable log reader mode and use its commands. When you are done with log reading and analyzing tasks, you can disable again NVDA+control+alt+L to disable the log reader mode.

The commands available in log reader mode are described hereafter.

 

Quick navigation commands

Single letter command similar to browse mode quick navigation keys allow to move to various type of log messages:

  • m: any message
  • e: ERROR
  • i: IO
  • d: DEBUG
  • f: INFO
  • g: DEBUGWARNING
  • w: WARNING

Pressing the single letter moves to the next occurrence of this message. Combining the letter with the shift key moves to the previous occurrence of this message.

 

Opening a file in your editor

When looking at a traceback, you may want to open one of the source files to understand the cause and the context of the issue. Press C to open the source code file corresponding to the current line of the traceback.

For this feature to work, you need to have configured your favorite editor's command. If you are not running NVDA from source, the location of NVDA source code also should have been configured. For more details regarding the configuration, please see the paragraph NVDA Debug & Test Tools configuration.

 

Python console extension

In the console, you can call the following function to view the source code that defines the variable myVar:
openCodeFile(myVar)

For this feature to work, you need to have configured your favorite editor's command. If you are not running NVDA from source, the location of NVDA source code also should have been configured. For more details regarding the configuration, please see the paragraph NVDA Debug & Test Tools configuration.

The openCodeFile functions can be called on objects defined in NVDA's code or on objects defined by add-ons. It cannot be called on objects whose source code is not available such as python builtins.

Below are examples of call in NVDA's code:

  • View the definition of the function speech.speech.speak:
    openCodeFile(speech.speech.speak)
  • View the definition of the class TextInfo:
    openCodeFile(textInfos.TextInfo)
  • View the definition of the method copyToClipboard of the class TextInfo:
    openCodeFile(textInfos.TextInfo.copyToClipboard)
  • View the class definition of the focused object:
    openCodeFile(focus)
  • Open the file api.py defining the module api:
    openCodeFile(api)

 

Log the stack trace of the speech function

Sometimes, you may want to see which part of the code is responsible for speaking something. For this, you can enable the stack trace logging of the speech function pressing NVDA+control+alt+S. Each time NVDA speaks, a corresponding stack trace will be logged in the log.

Note: You may modify the script's file directly to patch another function. See all instructions in the file for details on usage.

 

NVDA Debug & Test Tools configuration

The log reader commands and the python console extension feature may require a specific configuration. To use functions that allow to view source code in your editor, you should first configure your editor's command line. If NVDA's file need to be viewed and if you are not running from source, you also need to configure NVDA's source code path.

 

Editor's command line configuration

To use the 'open source code' command or the openCodeFile console command, you need first to configure the command that will be called to open the file in your favorite editor. For this, open the NVDA console (NVDA+control+Z) and type the following line and then Enter: config.conf['ndtt']['sourceFileOpener'] = r'"C:\path\to\my\editor\editor.exe" "{path}":{line}' You should of course modify this line according to the real name and location of your editor and the syntax used by it to open files. {path} will be replaced by the full path of the file to open and {line} by the line number where you want the cursor to be set. For Notepad++ for example the command to type in the console would be: config.conf['ndtt']['sourceFileOpener'] = r'"C:\Program Files\Notepad++\notepad++.exe" {path} -n{line}'

 

NVDA source code path configuration

When a file belonging to NVDA's core is listed in the traceback, the line is of the following form: File "config\profileUpgrader.pyc", line 30, in upgrade

If you are not running NVDA from source, you may specify an alternate location where the source file will be found, e.g. the place where you have cloned NVDA source files. In this case, you have to configure the path where you have NVDA source files located.

For this, open the NVDA console (NVDA+control+Z) and type the following line and then Enter: config.conf['ndtt']['nvdaSourcePath'] = r'C:\pathExample\GIT\nvda\source' Of course, replace the path of NVDA source with the correct one.

Be sure however that the version of your source file (e.g. GIT commit) is the same as the one of the running instance of NVDA.

 

Change log

 

Version 2.0

  • New feature: Enhanced restart dialog to specify some extra options when restarting NVDA.
  • New feature: extended description mode.
  • Play error sound feature harmonized between pre and post 2021.3 versions of NVDA.
  • New feature: Log reader commands are now available in the log viewer and also optionally in edit fields or webpages.
  • New feature: In the Python console, an openCodeFile function is available to view the source code of an object.
  • Some features are now disabled in secure mode for security reasons.
  • The add-on's compatibility range has been extended (from 2019.2 to 2021.1).
  • Releases are now performed with GitHub action instead of appVeyor.

 

Version 1.0

  • Initial release.
 
  •  

321 - 340 of 19412