return to OCLUG Web Site
A Django site.
June 19, 2013

Ian Ward
excess
excess.org - News
» Write the Docs

I will be attending the Write the Docs conference in Portland on Monday/Tuesday.

I've spent a lot of time with Sphinx this past year working on updating and improving the Urwid documentation. I've found writing documentation is a really hard but also really important and rewarding part of my programming work.


» Sean Zicari's Curses and Urwid Talk

Sean Zicari gave a Curses and Urwid presentation at the recent PyCon US in Santa Clara.


» data.gc.ca

A site I've been working on for the past few months has just launched. data.gc.ca "2.0" is a completely rewritten version of the Open Data portal for the Government of Canada.

I worked on the CKAN portion of the site responsible for the data catalogue. CKAN is an open source Data Portal application written in Python. I built a fully bilingual schema with many additional fields for our datasets. I also optimized, fixed and improved many parts of CKAN itself.

Our team built templates based on the Web Experience Toolkit (WET). WET provides building blocks for creating accessible, mobile-friendly web sites. These templates include a map widget for our geospatial datasets and an interactive data table for previews of tabular data.

All of our work is available on the open-data github page and is released under a permissive license.

data.gc.ca might just be the largest, most fully bilingual and most accessible CKAN site anywhere. More to come!

March 15, 2013

Ian Ward
excess
excess.org - News
» Painting with Braille

This is something I've been wanting to write for a while.

Unicode page U+2800 has all the combinations of a 2x4 grid of Braille dots. Braille dots that line up neatly with the ones on all sides in most fonts. We can paint with this!

February 26, 2013

Ian Ward
excess
excess.org - News
» Iterables, Iterators and Generators: Part 2

This is the second part of the talk I gave January 24, 2013 at the Ottawa Python Authors Group.

Part One introduces Python iterables and iterators and generators. This part covers the advanced use of generators while building an interactive two-player network game.

February 12, 2013

Ian Ward
excess
excess.org - News
» Iterables, Iterators and Generators: Part 1

This is part one of a talk I gave January 24, 2013 at the Ottawa Python Authors Group

Part Two is now also available.

Both parts of this presentation are also available as a single IPython Notebook which you can download and run locally, or view with nbviewer.ipython.org. The complete source is available at https://github.com/wardi/iterables-iterators-generators

January 12, 2013

Rob Echlin
echlin
Talk Software
» New Java 1.7 vulnerability

I found this in my email:

http://www.h-online.com/developer/news/item/Dangerous-vulnerability-in-latest-Java-version-1781156.html

I will disable Java plugin in all browsers on my machines at work on Monday.

Cert.org is taking this seriously: http://www.kb.cert.org/vuls/id/625617

This could be used against Linux, Mac or Android, not just Windows, if anyone cared to try. They would not have access to root without further exploits, although popping up a window that looks like your Updater, or Microsoft’s, would catch some inexperienced Linux users.


Tagged: security, software

November 16, 2012

Ian Ward
excess
excess.org - News
» Urwid 1.1.1 and 1.0.3 Released

Urwid maintenance releases 1.1.1 and 1.0.3 are now available. These releases contain only bug-fixes, see the Changelog for details.

November 14, 2012

Ian Ward
excess
excess.org - News
» Urwid Applications at PyCon Canada

I gave a 20-minute talk running through 7 great Urwid Applications at PyCon Canada in Toronto this past weekend.

The "Console Applications with Urwid" video is now available. Huge thanks to the conference organizers for great, first, PyCon Canada. I look forward to the next one.

The programs I covered were:

November 1, 2012

Ian Ward
excess
excess.org - News
» Python Container Literals

This post covers some basic Python syntax that tends to trip up people just starting with the language.

Literal tuple, list, dict and set definitions have some edge cases you need to be aware of when reading and writing Python code. Unfortunately some of these cases aren't consistent or obvious, but once you understand why they exist, they are easy to remember.

October 23, 2012

Ian Ward
excess
excess.org - News
» Urwid 1.1.0 Released - Containers & Documentation

October 8, 2012

Rob Echlin
echlin
Talk Software
» Template Files in DITA Open Toolkit may not be needed

I learned in Eliot Kimber’s “DITA for Practitioners”, after some re-reading, how the integrator.xml ant script works. It looks for template files and creates the corresponding file from it. When the integrator script creates the corresponding xml file from the template, it inserts “stuff” (different for Ant files or SXL files) from all the places that add to that extension point.

As far as I can tell, and this is not explicit in any documentation I have seen, including Kimber’s book, you only need to create a template file in your new plugin when you have defined a toolkit extension point in it. For plugins that you are sharing, you probably want to add extension points to your plugin. For plugins only used in your own DITA deployment, you probably don’t need to do that.


Tagged: DITA, software

October 7, 2012

Rob Echlin
echlin
Talk Software
» Review: DITA for Practitioners, Vol. 1

Author: Eliot Kimber, XML Press

I will start this review with my conclusion:
I recommend this book for the DITA developer, and also for the person designing your DITA Information Model. Some parts are useful for the writer who is using DITA, but there are other books for them.

In this review, I will describe how I think the software developer for a DITA implementation, someone whom Kimber would call a DITA Practitioner, should use this book for the first year or more of their first DITA deployment. Then I will describe what parts of the book I think an Information Model designer should concentrate on.

For the DITA developer:

When I got Eliot’s book in April 2012, I thought I had a good grounding in DITA development.
However, I found in “DITA for Practitioners” a lot of useful data that I had not seen before. In some areas, I thought the writing was a bit pedantic, but I often found that valuable nuggets of information are hidden inside even those parts.

First, Chapter 1 is a good summary about DITA. I refer new DITA developers to it. It helps define what you need to know when you move to DITA from other technologies. It explains that DITA looks very differently at XML processing compared to previous systems. DITA especially treats all processing with the goal of extending DITA while allowing data interchange with other sites. This is further explained in Chapter 5.

Chapter 2 is about setting up your DITA environment. I did not set my systems up exactly the same way as Eliot did, but I made some changes after reading this chapter.

I wish I had been able to read Chapter 3 before I set up my company’s DITA prototype setup, because I would have set up new local Shell Document Types (DTD’s). It would have been better than modifying the existing DTD’s for our use. For instance, when we later opened files from our first DITA prototype, we could not immediately process them, because our DTD’s removes some elements that were used in those DITA files. By immediately setting up new DTD’s for our own use, we would have avoided that problem.

Chapter 3 has a lot of information for authors, but don’t skip it. Like most of the book, it is mainly for DITA implementers, and there is a lot of useful information squirreled away here that the authors don’t need. In particular, don’t skip the last half of this 100 page long chapter. Task steps for conditional processing (Authoring Step 15), and using DITAVAL’s (filtering) (Authoring Step 16) are hidden here. Guidelines for CCMS requirements are also hiding there.

In Chapter 4, you need to read “Introduction to Open Toolkit Customization and Extension”, pages 145-154, even if you have already written one or two plugins. It describes the XML elements of several plugin files. After reading it while creating my first plugins, I still refer to it occasionally.

When you are planning a new plugin, the examples at the end of Chapter 4 for HTML and PDF are required reading. They are sufficient to create simple working plugins, a bit more than what you need for “Hello World”.

Chapter 5, “Vocabulary Composition and Specialization”, tells how DITA creates the vocabulary of elements you use in your DTD’s. This is very useful background information, but to create a new DTD Shell yourself, you need the information in Eliot Kimber’s tutorials online, which will be in Volume 2 of this book. Read this chapter before you start, then keep it handy when you are using those aids. The last section, “DITA and Namespaces”, is academic material only useful when you care to know why DITA uses namespaces in some cases but not others.

Chapter 6 “Maps and Topics” is mainly theoretical. Skim it anyway. It starts by describing why the DITA approach is so different from previous XML document standards. It describes the importance of splitting topic order and linking (maps) from topic content, metadata use and precedence, generating several files from one input file and vice versa, and the various elements found in maps. You should find and read sections of it in detail when you use those parts of DITA.

Chapter 7, “General Structural Patterns in DITA” describes how DITA files are organized, presenting theoretical data for practical use. First key take-away: just because the DTD let’s you do it, doesn’t mean you can do it in DITA. This is a good summary of how DITA files are structured, and why these choices were made by the DITA standard. Read this chapter once.

Chapter 8, “Pointing to things: Linking and Addressing in DITA”, describes DITA’s various linking methods and how to use them. You need to know this, to allow you to constrain out only the elements your organization doesn’t need, and to help your writers.

Chapter 9, “Reuse at the Element Level, the Content Reference Facility”, is about reuse. My team avoided using conref’s until we had tried out DITA on a prototype project. That still seems like a good decision to me. Add it when you are comfortable with DITA.

Chapter 10, “Conditional Processing: Filtering and Flagging”, describes a topic that will inevitably arise in most writing teams. Again, like conref’s, we put it off at first. You need to learn how to do it, to implement examples, and help the team decide when to add it to your DITA implementation.

Chapter 11, “Value Lists, Taxonomies, and Ontologies: SubjectScheme Maps” is one I have only begun to understand. However, I think it addresses a problem I see at work, where we want to have different lists of “conditional” topics for different projects. I need to point it out to my Information Model Designer, and see if it solves our problem.

Appendix A: “Character Encodings, or What Does UTF-8 Really Mean?” presents useful information about character encodings. Kimber starts it as a rant, with the most useful information at the end of the chapter.

Appendix B: “Bookmap: An unfortunate design” is valuable reading for a Sunday afternoon, but in Technical Publications, you probably want to start out by using Bookmaps as the top map of your document. The bookmap should include only other maps, so it is one small file in each project. You can replace it with something better if you run into its limitations.

For the Information Model designer:

There is a lot of information here that isn’t in the books for DITA writers, but which is very useful, or required, for the Information Model designer.

If you are the Information Model designer, or the first DITA author on your team, you need to read Chapters 3, 6, 7 first. When you want to worry about links, read Chapter 8. Chapter 8 also introduces re-usable strings, because DITA uses the linking technology as one way to store strings. Because these strings can be used conditionally, as described in Chapter 10, Chapter 8 also spends a couple of pages describing Conditional Processing as it applies to keys.

For content reuse, read Chapter 9, about “conref’s”, the Content Reference facility. You use conref to reuse whole topics and common portions of a topic. This includes DITA’s second method for storing strings, this time strings that can contain other XML elements.

You will need to consider Chapter 11 when you have lists to track that are used in XML editing. This would include different lists for each of your projects to use for conditional processing.

Summary:

I find this book is often a better choice than searching the web, because it presents information that is not described or summarized as well in the DITA Users list or other venues. It has a mass of reliable, usable information. If you are a DITA developer, you need this book. If you are an Information Model designer, you will also find information here that you need and won’t get elsewhere. Your DITA developer will almost certainly forget to tell you about some of it, if they actually know about it. I know I found info while preparing this review that my Information Model designer needs!


Tagged: DITA, software, software team, tools

July 13, 2012

Ian Ward
excess
excess.org - News
» Urwid 1.0.2 Released

Urwid maintenance release 1.0.2 is now available.

May 17, 2012

Rob Echlin
echlin
Talk Software
» Search in DTD’s on Windows – Fail!

So you have some DTD files: the main DTD files, model files, and entity files, in a number of folders and sub-folders on Windows XP.

They have extensions as follows:

  • dtd
  • mod
  • ent

Search for something using Windows Explorer, in it’s Search pane. Tell it to search all files and folders. Results? Only from some of the files, not all. Why?

Look at the no-search, no-folders mode of Windows Explorer. It offers to help you view videos, but can’t actually find any to show you. Odd, but related. This is because Windows is aware of a video file type with an extension of “mod”. So it won’t search those files.

Fail.

Let’s try the command line! You can use “find” to search the contents of files, but only in the current folder.

Fail.

Fix it with GetGnuWin32! And use grep to find your stuff.


Tagged: Gnu, Linux, software, Windows

April 26, 2012

Ian Ward
excess
excess.org - News
» Gerbi CMS

Gerbi CMS (nee django-page-cms) is a multilingual content management system written in Python and based on the Django web framework. It's currently my favourite CMS software and use it for a number of web sites I administer.

I'll be giving a talk about Gerbi CMS at the next OCLUG and OPAG meetings resembling this article.

April 9, 2012

Ian Ward
excess
excess.org - News
» Paranoid Django Templates

If you've ever wanted to know if a Django template is using a variable it shouldn't be, or not using a variable it should, this code will make both cases fail loudly. Django's default template behaviour is to silently replace missing variables with an empty string, and ignore unused variables.

To use this code you can either:

  1. wrap your Context (or RequestContext) object in your view with a ParanoidContextProxy that will fail on any attempt to access a missing variable, or
  2. use the paranoid_render_to_response function (or similar) to also require that every variable you pass be used in the template.

February 29, 2012

Rob Echlin
echlin
Talk Software
» paranoia part 2

The software isn’t out to get me, it got me already.


Tagged: humor, software

February 26, 2012

Rob Echlin
echlin
Talk Software
» It’s not the “Sound” app, it’s alsamixer

Finally got the sound working on my laptop, running Mint 12 and Cinnamon.

The fix was to go to the Gnome Alsa Mixer and uncheck “External amplifier”. The “Sound” app on the system bar seemed to allow the same change, but it didn’t seem to stick.

I first tried adding more gStreamer plugins. No effect. There were already some gStream plugins installed, but there are lots and lots of others to distract you!


Tagged: frustration, Linux, Linux sound problem, software

February 20, 2012

Rob Echlin
echlin
Talk Software
» jackd out, sound came back

I have had a real problem with sound on Xubuntu for the last week.

The system says  “Welcome to Xubuntu 9.10″ in the web page reached with “Applications > Help”, and “Update Manager” says “11.04″ is available, so I think this is the system that was originally installed a s 9.10, and upgraded to 10.04 and 10.10.

There was no way for me to get sound out of this system. Many tweaks and such did not help. Windows runs sound fine.

I looked to see if I installed anything recently, and “Synaptic” said I had installed jackd – way back in October. I uninstalled jackd, and now I can output sound. I am able to record from a USB webcam, but Pinyinpro.com won’t use it.

One thing at a time.


Tagged: frustration, Linux, software