Thursday, May 26, 2011

Creating A Nepali .po File for Sphinx

Arati Sharma is working with SchoolTool during the last 3 weeks of high school.

There are probably few places anywhere in which a greater number of languages are spoken than in Arlington, Virginia, so it didn't come as a total surprise that W-L High School had several Nepali speaking students in its computer science program.  Arati was one of these students, and now she will be spending 100 hours helping provide SchoolTool documentation for OLE Nepal.

After spending the 1st two days of her internship getting a whirlwind introduction to the Unix CLI, ReST, sphinx, launchpad, and bzr, she started today to work on translating the SchoolTool Book into Nepali.

That's not a task she will finish in 100 hours, so we want to focus on getting the process working well and making contributions to the technologies we are using to support continued work on the project later.

Top on the list of requirements is getting Nepali support into sphinx.  We will be using the information in this post from the sphinx-dev mailing list to get started.

Creating a Sphinx .pot File

Here is what I did (from a unix prompt on a Natty box):
  • sudo aptitude install python-virtualenv python-pip
  • sudo aptitude install python-sphinx mercurial
  • virtualenv --no-site-packages sphinx-nep
  • pip install -E sphinx-nep babel
  • pip install -E sphinx-nep jinja2 --upgrade
  • cd sphinx-nep
  • hg clone
  • cd sphinx
  • ../bin/python extract_messages
  • ../bin/python init_catalog -l ne_NP -i sphinx/locale/sphinx.pot -o sphinx/locale/ne_NP/sphinx.po
That's it!  We now give Arati the sphinx.po file and set her up with the latest sphinx, and she is ready to add Nepali support to sphinx.

Friday, May 20, 2011

Getting Ready for Scratch Day

Saturday is Scratch Day at GCTAA, so I'm getting the Ubuntu lab ready for our guests.  This means:
  1. install Scratch
  2. create a shortcut on the guest account to launch Scratch
  3. configure firefox to start at the Scratch website on the guest account
  4. lock the guest account using ofris, a cool deep-freeze like app for linux
To tackle each one of these tasks in turn, here's what I did:

Installing Scratch

We have 64 bit Ubuntu 11.04 ("Natty") systems, so before the Scratch debian package can be installed, we needed to make sure the 32 bit libraries were present.
  • sudo aptitude install ia32-libs
 After that, just download the ubuntu Scratch package from here, and force install it using
  • sudo dpkg --force-architecture -i ./scratch_1.4.0.1-0ubuntu5_i386.deb
Creating a shortcut on the Unity desktop involved clicking the search icon (+ with magnifying glass), typing Sc, grabbing the Scratch icon and dragging it to the launch panel.

Installing ofris

Start by adding the Personal Package Archive (PPA) to your apt repository list and updating the package database:
  • sudo add-apt-repository ppa:tldm217/
Packages for Natty aren't available yet, but the packages from Maverick (10.10) work fine, so I edited the apt sources list file
  • sudo vi /etc/apt/sources.list.d/tldm217-tahutek_net-natty.list
changing natty to maverick with
  • :g/natty/s//maverick/g
  • :wq
Then I updated the package list and installed ofris-en
  • sudo aptitude update
  • sudo aptitude install ofris-en
After logging into the guest account (with user name student on the machines in our lab) the way I wanted it, I ran ofris to lock the account
  • sudo ofris-en
which brought up a dialog box that looks like this

    Dafturn Ofris Erdana - Locking your Systems
         By : Muhammad Faruq Nuruddinsyah

Your choice :
  1. Freeze the system for this User only
  2. Freeze the system for specified User
  3. Freeze the system for all Users
  4. Unfreeze the system
  5. View status
  6. Exit

Please insert your choice number :


I selected 2 to freeze the system for the guest user, typed in student, and hit enter.  After a reboot, the guest account was "frozen" and we were ready for our Scratch Day visitors.

Thursday, May 12, 2011

eduJAM! 2011

Last week, I represented the SchoolTool project at eduJAM! 2011, a free software developers meeting in Montevideo, Uruguay, organized by ceibalJAM!

It was an amazing experience. The main topic of the summit was Sugar, its development and deployment experiences. As a SchoolTool developer, I was interested in doing some networking with the Sugar community, especially people from Latin America. I also wanted to share our experience collaborating with OLPC deployments, specifically with OLE Nepal, and to meet people I only knew through email or IRC.

And as a member of the Juan Chacón Free Software Project, I wanted to hear about other people experiences. I definitely learned a lot from this trip.

Here are my highlights from the trip (interesting people I met, talked and listened to):
  • I met Adam Holt, who helped us so much and clearly remembered all the trouble we faced in customs when we got the XOs for the Buena Vista community. Adam also showed me the olpcMAP, an initiative for Sugar projects and users to create a geosocial network and share information about their deployments around the world. We also fixed the Buena Vista community marker, putting it in the right coordinates! Thanks to him, I got subscribed to the OLPC Sur mailing list, an OLPC mailing list in Spanish.
  •  Nick Doiron who has worked in the Uguanda deployment and demonstrated a really cool way of using the Memorize activity for teaching maps using electric resistances.
  •  Walter Bender, who recommended that I learn about the Nicaraguan deployment experience and provided a great "Sugar Future" talk.
  •  Martin Langhoff, a core Moodle developer who works for OLPC, explained me how Moodle works. I told him about how Critical Links has been able to use SchoolTool to drive Moodle and LAMS.
  •  Rodolfo Arce, who works in the Autonomic University in Paraguay, told me about the inventory system they built for tracking their XOs and how they extended it to have basic SIS functionality.
  •  Christoph Derndorfer, who did an excellent work translating from English-Spanish and viceversa. I liked his remark about how we should focus on processes instead of tools.
  •  Carlos Rabassa, who visited El Salvador ("the land of volcanos") during the 70's and whose translation work in mailing lists is amazing.
  •  Pablo Flores and the ceibalJAM! team who organized a really great event.
  •  Uruguayan teachers who shared their experience in Plan Ceibal and asked questions about SchoolTool.
  •  The Butiá project for controlling robots using the XO and TurtleArt.
  •  lapix, a really cool tool for converting the XO into a pen + notebook.
  •  The sensors demonstration, using the XO to take a picture when you interrupted a light sensor or for detecting a tuning fork; everything coded in TurtleArt.
  •  The Tools for the community panel, where really shined and I realized maybe we shouldn't be so "close-minded" about technologies like Facebook...
  • and how I'd wish to have something like that in San Salvador.

I hope someday more Salvadorean people interested in Sugar, like Erick Rosales, are able to attend to this kind of event. It really inspires you.

Saturday, May 7, 2011

Waiting for Mr. Cerna's Return...

Douglas is in Uruguay, and while I wait with anticipation to hear about his trip to EduJam!, I've continued forging ahead - taking a look at the new offerings from Ubuntu (11.04, "Natty"), and Fedora (Fedora 15) to begin thinking how these new releases will fit into our activities for the coming Summer.

Fedora 15

The final release of Fedora 15 is only 2 1/2 weeks away, so I think an install now will smoothly 'yum update' into the final release.  I installed from the Live CD on a Dell Latitude 2100 Netbook computer. It installed without incident, and I ran 'yum update' and waited for the hundreds of packages to update (since the install was from the beta release disk).  Everything updated without incident.

I'll have to spend some time with Gnome 3 to decide how I feel about that, but what I really wanted to know was how easy it would be to get Sugar working on this system.  The answer, to my delight, was that is was easy!  It required only running the following command:

    # yum install @sugar-desktop --skip-broken sugar-emulator alacarte sugar-surf

After that I logout and choose Sugar when I logged back in.  I've only had a few minutes to explore, but what made me most excited is that everything seems to work.  When I started the Speak activity I was greeted with "Hello Jeffrey Elkner!  Type something!"  In earlier versions of Sugar sound had failed to work on these netbooks.

Sugar Labs, DC has two student interns who will be with us the last week of May and the 1st two weeks of June.  It looks like there is fun in store for them seeing what Sugar can do on our Dell netbooks.

Ubuntu Natty

I've been running Ubuntu 11.04 ("Natty") for over two months already on testing machines, and it is already installed on the machines in the CS / ICT lab at GCTAA.  What I wanted to see now is if I can use Lubuntu and RemasterSys to make a live USB image for use in our upcoming Summer 2011 Web Application Development program.

Here is what I did:

  1. I started with the mini install disk. I'm a huge fan of this little disk image since it provides tremendous flexibility and ease of use.  From this one disk you can install standard ubuntu, command-line only server, kubuntu, xubuntu, or lubuntu (and any other version with a "[distro name]-desktop" meta-package).  To have get this flexibility, select "Help" from the opening menu, press for boot options, type "cli" at the "boot:" prompt, and press enter.
  2. I installed using the "cli" option on a VirtualBox machine (running under my regular Natty desktop.  Starting the machine after the install, I needed to press ALT-F1 (or F2..F6) to get a console prompt.  We noticed this problem earlier on other machines using the cli install option from the mini disk. I don't know if this apparent bug has been reported.  I'll check with Matt next week and take appropriate action.  Anyway, after pressing ALT-F1 to get a login prompt, I logged in and ran:  sudo aptitude install lubuntu-desktop .  It is the ease of use of these metapackages that make the mini cd so useful.
  3. The ose (open source edition) of VirtualBox that comes with Natty works like a charm.  I didn't need to install the guest editions that used to be required to support the video driver.  It just worked.  Once the lubuntu desktop finished installing, I added: deb karmic/ to the apt sources list and installed remastersys.
  4. One small annoyance is that I needed to set a root password to get either the synaptic package manger or the remastersys-gui to run after launching them from the menu.  If I recall correctly, this doesn't happen if you install lubuntu from the lubuntu installation cd instead of using the lubuntu-desktop metapackage on a cli install from the mini cd.  (Note to self: confirm this and report the problem if appropriate).
  5. I made a bootable live usb stick from a netbook running lubuntu with remastersys installed.  That machine does not have the system tools authentication problem.  I was able to install on a virtualbox and to a usb stick with the image.
That's all for today.  I think today is Douglas's last day in Uruguay.  I'm looking forward to talking to him when he returns!

Sunday, May 1, 2011

Python CGI and Jinaj2 Templates - Part I

I'm getting ready for the Summer 2011 Web Application Development program we will be offering at the Governor's Career and Technical Academy in Arlington.

I've long wanted to be able to use a simple template engine to create headers and footers on websites.  I've been using the PHP include statement for this purpose, but I would really like to use the Python Jinja2 engine instead.

It appears I may be able to work on my bluehost web hosting account.  Here is what I did:
  1. Edit the .bash_profile file and add the following:
        export PYTHONPATH
  2. Download the Jinja2 source tarball from here.
  3. Extract the source directory from the .tar.gz file and cd into the new directory.
  4. Run: python install --home=~ (see this for more on that ;-)
I was able to import jinja2 in a python shell, create a template and call render on it.  I will report back later as I progress from here...