Re: [orca-list] code review
- From: Alex Midence <alex midence gmail com>
- To: "'Mike Dupont'" <jamesmikedupont googlemail com>
- Cc: orca-list gnome org
- Subject: Re: [orca-list] code review
- Date: Mon, 23 Dec 2013 17:04:09 -0600
Sorry, misspelled the name of the application. It's Simon:
http://docs.kde.org/development/en/extragear-accessibility/simon/introductio
n.html
Question for you: Are you revising the latest version of the Orca code?
Just wondering how what you are propsing ties in with what Joannie is trying
to accomplish on her end. I haven't heard her chime in on this topic
probably due to holiday things she's attending to. I would hate for there
to be a duplication of efforts or working a cross purposes between you two
since she is the current project lead.
Now then, having said all that, I can vaguely follow what you are suggesting
(not versed enough in Python) and I like the idea of making it easier and
for end users to edit the code and modify it. I took a look at the jinja2
templating engine and it looks like quite the time saver.
I'm frankly in favor of anything that improves Orca and makes it do more
than it does while empowering the end user to customize it more easily.
Hopefully, others who are much more versed in Python than me (won't take
much, haha) and have studied the Orca code some will chime in and give
their opinion.
Regards,
Alex Midence
-----Original Message-----
From: Mike Dupont [mailto:jamesmikedupont googlemail com]
Sent: Monday, December 23, 2013 3:50 PM
To: Alex Midence
Cc: Jonathan Nadeau; orca-list gnome org
Subject: Re: [orca-list] code review
On Mon, Dec 23, 2013 at 1:52 PM, Alex Midence <alex midence gmail com>
wrote:
Symon
Link?
I just got off the phone with Johnathan, the first step I think for orca is
to strip out all complex formatting code and push it out.
We need to make it into something that can be edited by blind people.
take a look at this :
https://github.com/h4ck3rm1k3/orca/blob/f79656250c6946e3bfd2e9184467ac97a84f
5b40/src/orca/formatting_braille_eval.py
it represents a closed world representation of the braille formatting, each
function represents one of the nested ifs:
def action_3_unfocused ():
return [Component(obj,asString(label + displayedText + roleName +
(description and space(": ") + description)))]
It should look more like :
class SomeAction(SomeBraileAction) :
def unfocused():
return [
Component(obj,asString(label + displayedText + roleName +
(description and space(": ") + description)))
]
What if we moved the format strings into a jinja2 template system?
http://jinja.pocoo.org/docs/
Even better it could be a template like :
{{label}} {{displayedText}} {{roleName}} {{description}} {{space(":
")}} {{description}}
but i am not exactly sure how that would work yet, but the idea would be
move all the formatting out into a domain specific language that can be
edited in small specific files by disabled people and not some bloated huge
nested dict.
mike
--
James Michael DuPont
Member of Free Libre Open Source Software Kosova http://www.flossk.org
Saving Wikipedia(tm) articles from deletion http://SpeedyDeletion.wikia.com
Mozilla Rep https://reps.mozilla.org/u/h4ck3rm1k3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]