Monotonous.org

Eitan’s Pitch

Introducing Pyia

July 1st, 2008 Filed under: Accessibility, Software, Technology by Eitan

Last week I was doing my best to dive into the wonderful world of Windows accessibility. So to flatten the curve, I decided to take shot at making a lightweight Python MSAA client library, Pyia.

It is heavily inspired by pyatspi’s class mixins. pyOrbit made it very easy to do this in pyatspi, making CORBA friendly and Pythonic. Comtypes, does the same in Windows, making COM cool as a cucumber.

Accessible objects emulate containers for easy access to children nodes. Also notice a few convienient methods, like getDesktop which returns the desktop client. Also getStateName will return a human readable list of states rather than a bitmask.

>>> import pyia
>>> desktop = pyia.getDesktop()
>>> for window in desktop:
        if not window.accState(0) & \
          pyia.STATE_SYSTEM_INVISIBLE:
          print window
 
[window | ]
[window | Python Shell]
[window | Mozilla Firefox Start Page - Mozilla Firefox]
[window | Program Manager]
 
>>> desktop[14].accStateName()
u'unavailable invisible'

This might be a bad idea, but I added some AT-SPI concepts, for example a registry, where you connect event callbacks. Also, events are wrapped in structures with a “source” field that is a reference to the accessible that is responsible for the event. There is no extra wire traffic because the reference is not retrieved until the source field is either explicitly called, or the event is printed (converted to a string).

>>> import pyia
>>> def event_cb(event):
        print event
 
>>> pyia.Registry.registerEventListener(
        event_cb, pyia.EVENT_OBJECT_FOCUS)
>>> pyia.Registry.start()
gainFocus
        source: [client | Mozilla Firefox Start Page - Mozilla Firefox]
        window: 524618
        thread: 568
        tstamp: 14692927
gainFocus
        source: [client | Python Shell]
        window: 1573178
        thread: 352
        tstamp: 14694599
>>>

You could try this stuff out by checking it out from Github.
If that is too much overhead, here is a binary Windows installer.

You will need the comtypes Python module.

6 Comments »

I *heart* Translators

June 12th, 2008 Filed under: Software, Technology by Eitan

I know that I am supposed to be all gratuitous and all when it comes to translators who do a thankless job, and improve software by orders of magnitude to make them accessible to many locales. I usually am very thankful.

In the past month I have briefly turned my back Accerciser trunk, and in that time some cuddly translator managed to bugger it not once, but twice.

Once when someone uncommented a comment in the LINGUAS file, which resulted in an unconfigurable tree. Another time when someone changed a *.po file to have executable permissions. This was more annoying, since there is some script there in s.g.o’s guts that rejects any commit if the repo has an executable. Now you know me, I never look at the output message after I commit to SVN, especially now since I am doing it through git. Result: all my commits to Accerciser in the last month have been rejected, and I never realized it.

I know what you all are thinking:

  1. Why don’t you just look into the Subversion history, and see who is messing with you? Well, I prefer to remain ignorant, and make sweeping accusations - I am bored.
  2. How in hell did an executable po file get into the repo in the first place? I don’t know, and searching for the answer might lead me to the answer of the first question, so I won’t bother.

4 Comments »

X Marks The Spot

February 21st, 2008 Filed under: Software by Eitan

This weekend I spent some extra time in front of the computer. I was itching to get some kind of geotagging support into F-Spot. It was a fun ride, I got to relearn C# and use Monodevelop. Both of which are swell, it is a real plush experience. And Stetic is neat.

Screenshot of geotag extension

Anyway, this extension allows you to take a GPS track file, and correlate it with photos using the EXIF timestamp. The result is a collection of automatically geotagged photos. You could see my start of a geotag collection here.

You could get this work in progress with SVN:

svn co http://monotonous.org/geotag/geotag

To do:
- Tag multiple versions, now only the default version gets tagged (maybe
that is enough?).
- Deal with RAW. I didn’t even test this, or for that matter anything
non-jpeg.
- Allow timestamp adjustments in the dialog. My Canon digital rebel does
not provide a way to synchronize the clock very well, so the timestamp
will never be very accurate (I heard you could do that in Nikon, but
don’t get me started!).

Far future:
- Include a map widget. Unless you are a dork like me walking around
with a GPS logger, this extension is useless. A map widget will allow
people to review the coordinate info, and easily adjust it. I could
personally live without the map now, because I upload pics to flickr,
and it does the pretty map bit for me.

4 Comments »

Accessibility in Linux Journal

February 19th, 2008 Filed under: Accessibility, Personal, Software, Technology by Eitan

As Will pointed out, the latest issue of Linux Journal is focusing on the desktop, with not one, but two articles devoted to desktop accessibility! If I read the contract that I signed hastily right, I keep the copyright for the article, so I could post it here.

No Comments »

Hello Planet

December 20th, 2007 Filed under: Personal, Software by Eitan

The rumor is that I am aggregated on Planet Gnome, thanks Jeff for adding me. This is so exciting. Behdad just gave me a tip of the hat (thanks!), so I guess it is time for an introduction.

I have been a GNOME user since some time in the late 90s, and an abuser for the last couple of years. Besides some silly personal projects, my first real code contribution was probably Avatar support for Gossip. Later I spent some time migrating Gossip over to Telepathy, at some point that burnt me out, but Xavier Claessens persevered, and today we have Empathy.

I started my accessibility work when Peter Parente, George Kraft IV, and Cathy Laws took me on board as a contractor at IBM to work on LSR, it was a bunch of fun. When IBM decided to shut down their Linux accessibility efforts, the group introduced me and Scott Haeger to Aaron Leventhal, who helped us secure grants for continuing are Linux accessibility work. Scott since then has made huge steps in helping to make the web, specifically web applications accessible from Firefox on Orca, as you know this Internet thing is very trendy and catching on. In the meanwhile I finished work on Accerciser, joined the Orca team, and raised a rabble. You could read all about that on my previous post.

Working with the Orca folks, Rich, Joanie, Michael, Scott, and Will has been all fun and laughs.

My current project involves contracted braille support for Orca. This is a much often requested feature, and I look forward to making a difference in this space. I spent most of my time until now in Orca’s underbelly (migrating to a new client library, performance work, etc.) and it will be nice to make a real usable difference for a change.

That’s it. I hope you are all at the edge of your seats waiting for the next post.

1 Comment »

  • Photos

  • Categories

  • Archives