[nvda-addons] Re: Addon reviews

  • From: Derek Riemer <driemer.riemer@xxxxxxxxx>
  • To: "nvda-addons@xxxxxxxxxxxxx" <nvda-addons@xxxxxxxxxxxxx>
  • Date: Sun, 30 Apr 2017 14:01:38 -0600

To get it to show up in input help, put a __doc__ on the method for every
script.
script_foo.__doc__ = _("Causes NVDA to say copied"
If you want readme under addon help, then make sure your manifest has the
docFileName set to a file. You should be able to do this in the template.

On Sun, Apr 30, 2017 at 1:32 PM, Damien Sykes-Lindley <
damien@xxxxxxxxxxxxxxxxxxxx> wrote:

Hi,
It now bypasses browse mode altogether. I've also added more to the
documentation and assigned a script category. Still can't get it to show up
in addon help though.
Cheers.
Damien.
-----Original Message----- From: Noelia
Sent: Sunday, April 30, 2017 7:53 PM

To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Addon reviews

Hi:

2. How would I go about checking for browse mode? I'm guessing I'd somehow
have to get access to the treeInterceptor object?


I use this in placeMarkers, copied from NVDA's core long time ago (maybe
another way):

obj=api.getFocusObject()
treeInterceptor=obj.treeInterceptor
if hasattr(treeInterceptor,'TextInfo') and not
treeInterceptor.passThrough:

4. I'm hoping the addon shouldn't need documentation, unless of course I
add verbosity options and other configurations etc. Though obviously those
will be future releases.



I suggest you to explain if the announcements can be inaccurate in some
situations, so that user can decide and you don't receive feed-back for
known issues.
This can be shown in the readme if you want, as done in the Dropbox add-on.
Also, you can add scriptCategory so that user can remove script gestures
as control+a if it's not accurate in some programs, and you can list the
used gestures and categories if you want.
Cheers.



El 30/04/2017 a las 20:42, Damien Sykes-Lindley escribió:

Hi,
1. I'm guessing your multiple copy is to do with the exception handler,
which simply skips any data that it can't read. A change is only
acknowledged if the clipboard data is exactly the same as the cached
data, which obviously isn't the same in your case, for whatever reason.
2. How would I go about checking for browse mode? I'm guessing I'd
somehow have to get access to the treeInterceptor object?
3. Markdown hopefully fixed.
4. I'm hoping the addon shouldn't need documentation, unless of course I
add verbosity options and other configurations etc. Though obviously
those will be future releases.
5. I'm guessing your paste error is something to do with the browse mode
problem previously mentioned - NVDA seems to have its own handlers for
browse mode. I thought this was merely Mozilla windows which I disabled
in my third commit but it seems it's browse mode in general.
Cheers.
Damien.
-----Original Message----- From: Noelia
Sent: Sunday, April 30, 2017 7:02 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Addon reviews

Hi, much better. I don't get errors now. Anyway:
1. When I select all the text of NVDA's log and copy it several times,
copy is announced but not no change.
2. The add-on breaks functionality of NVDA in browse mode, and even of
Windows as pressing control+c the text is not copied.
3. Put a space or tab between markdown marks and text. You can see that
the list containing autor isn't properly converted opening
docs\en\readme.html when you build the add-on with scons.
You can see more info in the markdown webpage.
4. If you want, add the possibility of accessing to the documentation
html file from add-on Help as explained in the developers guide.
Thanks.
1 When I copy two times a file to the clipboard,

El 30/04/2017 a las 19:03, Damien Sykes-Lindley escribió:

Hi,
Wow, am learning a heck of a lot here. OK. Readme should now hopefully
be in markdown format, and looks like the so-called error you're getting
is a raised exception...And there's me thinking it was a code issue!
Hopefully it should now work, assuming of course my exception handler is
OK. Never dealt with exceptions before and it's difficult to test not
having experienced the same problem myself.
Cheers.
Damien.
-----Original Message----- From: Noelia
Sent: Sunday, April 30, 2017 5:25 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Addon reviews

The readme is there, but in plaintext and with a txt extension. Does
it need to be markdown or can it be imported as is?



Hi, I think it can be in txt format, but probably you can include
download to binaries, a title in a heading of level 1 and so on, so you
can use markdown, that in fact is plain text with some intuitive
elements used in e-mail messages as > for quotes, stars for list, etc.
Furthermore, the community website uses po4all, which convert markdown
to po files and po to markdown, so that documentation can be translated
in the same way that gettext messages.
So we name documentation files with .md extension on Github, as done in
NVDA, and with .mdwn on the website. Anyway it's markdown.
Cheers.

El 30/04/2017 a las 18:06, Damien Sykes-Lindley escribió:

Hi,
How does the error present itself with logging level set to debug?
The readme is there, but in plaintext and with a txt extension. Does it
need to be markdown or can it be imported as is?
Also I have used the copying.txt from the addon template, is this still
not how it needs to be?
Cheers.
Damien.
-----Original Message----- From: Noelia
Sent: Sunday, April 30, 2017 4:58 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Addon reviews

Hi, I think translatable strings are better now and that you're in a
good way.
Now I get this error when pressing control+c to copy a file

error executing script: <bound method GlobalPlugin.script_copy of
<globalPlugins.clipspeak.GlobalPlugin object at 0x04E1E1F0>> with
gesture u'ctrl+c'
Traceback (most recent call last):
  File "scriptHandler.pyo", line 187, in executeScript
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\__init__.py",


line 45, in script_copy
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\__init__.py",


line 84, in speak_appropriate_message
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\clipboard_monitor.py",


line 39, in changed
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\clipboard_monitor.py",


line 29, in enumerate_clipboard
error: (0, 'GetClipboardData', 'No error message is available')



Also, when I copy a text several times, NVDA says "No change" and this
can be good, though the same text has been copied to the clipboard.

About the readme, if you want can name it as readme.md to reflect that
it may content markdown, i.e. to build headings with #, list with *,
etc.

Another suggestion is that we can see the contributing to NVDA article
on the NVDA Wiki. There is another one about copyrights, and they can
guide us as add-on developers to apply these suggestion when possible to
add-ons.

About Git, for your interest, I have review just diffs from the last
time when I cloned your repo until now, like this (just a possibility).
from my local copy of the repo, I did:

git fetch
git diff ...origin > %temp%\cs.diff # To see the diff in a temporary
file named cs.diff

Cheers.

El 30/04/2017 a las 16:18, Damien Sykes-Lindley escribió:

Hi,
I've uploaded some new updates. Hopefully the translatable strings are
better, I've added some debug logging in there and added the readme and
licence files.
Cheers.
Damien.
-----Original Message----- From: Noelia
Sent: Sunday, April 30, 2017 1:10 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Addon reviews

El 30/04/2017 a las 13:35, Damien Sykes-Lindley escribió:

4. I may be wrong, but I thought the _(...) identifier made something
translatable? As for the + symbols, I can't find any + symbols in
quotes. Could you point me to a line specifically?


You're right: _() is a translatable string, but each substring
concatenated in the string should be translatable if needed, i.e,
instead of word="test", word=_("test")
You can check lines 78, 83 and 84 for example.

5. To be honest I'm not sure what I would put in a readme for an addon
this small. As for the licence, aren't all addons covered by GPL
automatically as per the NVDA licence? I'm pretty sure it specifically
says in there that all addons must be licenced that way.



The readme can be used for the add-on webpage on the community website.
You can put something like

This add-on makes NVDA to report the following when these keystrokes
are
pressed:
* control+c: Copy to clipboard...

About the license, I prefer that other reviewer can answer. Before I
didn't include copyright and license information in my add-ons, but
it's
required.
Cheers.




El 30/04/2017 a las 13:35, Damien Sykes-Lindley escribió:

Hi there,
Commenting on your issues:
1. Very interesting. Might have to have a look at the logging
module to
see about adding more data to that. I have never had this issue and
since the message itself says that there's no error information
available, seems rather odd to say the least.
2. I put the date in there when it wasn't version controlled. To be
honest even now it is version controlled the dates aren't valid
because
I only put them through Git today, so the log would state 30th rather
than 19th which is when I wrote it.
3. Again, very interesting. I thought these commands were globally
recognised as Windows shortcuts and so assumed that it would work
everywhere. This will indeed be a tricky issue since I doubt there's a
way to retrieve shortcuts for common operations in different
languages.
I'm guessing this is one of the reasons it isn't available in NVDA
itself.
4. I may be wrong, but I thought the _(...) identifier made something
translatable? As for the + symbols, I can't find any + symbols in
quotes. Could you point me to a line specifically?

4. I may be wrong, but I thought the _(...) identifier made something
translatable? As for the + symbols, I can't find any + symbols in
quotes. Could you point me to a line specifically?



6. The notes are for development rather than user documentation. I
always keep the two separate so they never get mixed in a release
version.
Cheers.
Damien.
-----Original Message----- From: Noelia
Sent: Sunday, April 30, 2017 12:01 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Addon reviews

Thanks Damien. I've just done a quick review, not indept.
1. Testing: The add-on doesn't work (here's the log):
ERROR - globalPluginHandler.listPlugins (12:51:27):
Error importing global plugin clipspeak
Traceback (most recent call last):
  File "globalPluginHandler.pyo", line 22, in listPlugins
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\__init__.py",





line 33, in <module>
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\__init__.py",





line 149, in GlobalPlugin
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\clipboard_monitor.py",





line 10, in __init__
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\clipboard_monitor.py",





line 13, in get_clipboard
  File
"C:\Users\User\AppData\Roaming\nvda\addons\clipspeak\globalP
lugins\clipspeak\clipboard_monitor.py",





line 23, in enumerate_clipboard
error: (0, 'GetClipboardData', 'No error message is available')


2. For my own experience, I suggest you not to put the date of Python
files (optional of course), since it can be checked with Git, for
instance with git log --follow filename to see the changes.
Before using a control version system, I put date of changes in some
add-on and afterthat it was dirty for my own revision and I deleted
this.

3. Gestures could be inaccurate, for instance depending on
languages of
programs. I.e., control+a is used in Notepad to open a file, not to
select all. Maybe programs in which we can press control+c but not
copy
text, etc.

4. Translatable strings: File and text words are not translatable in
the
add-on, and + symbols are included in quotes.
Consider using %s or format if you prefer, or put plus symbol outside
quotes to concatenate strings.
5. Include a readme and license so that your add-ons can be posted on
the community website.
5. Perhaps you'd like to put a readme and notes.txt in the same folder
for simplicity.
That's all for now.
Cheers.



El 30/04/2017 a las 10:43, Damien Sykes-Lindley escribió:

Hi there,
It took a while, but we're there. Clipspeak is now gitted at
github.com/sykesman/NVDAAddon-Clipspeak
Cheers.
Damien.
-----Original Message----- From: Noelia
Sent: Friday, April 28, 2017 9:33 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Addon reviews

Hi, if you use Git, I will review at least one of your add-ons if you
want.
Furthermore, perhaps I'm wrong, but Bitbucket, as far as I
investigated,
doesn't have an easy way to import repos from Fossil, and if you want
that your add-on can be translated using the community system, we
need
to import your repo on Bitbucket, at least from now.
NVDA and most of the community add-ons use Git, and perhaps more
reviewers know this system.
Cheers.

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for
reporting bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting
bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe: //www.freelists.org/list/
nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting
bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe: //www.freelists.org/list/
nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx




-- 

Derek Riemer: Improving the world one byte at a time!

   - University of Colorado Boulder Department of computer science, 4th
   year undergraduate student.
   - Accessibility enthusiast.
   - Proud user of the NVDA screen reader.
   - Open source enthusiast.
   - Skier.

Personal website <http://derekriemer.com>

Other related posts: