Update atomgen to use lxml instead of Amara and add Amara post.
[blog.git] / posts / Amara.mdwn
1 At one point my [[Atomgen]] script used Amara, because I liked the
2 bindery interface.  However, I was having [problems][] with wide
3 Unicode characters, so I've updated Atomgen to use more widely
4 supported XML libraries ([lxml][]'s [objectify][] API is similar to
5 Amara's bindery).  For future reference, I'll recount my history with
6 Amara.
7
8 I started off using Sylvain Hellegouarch's [Atomixlib][], which is
9 based on [Amara2][] or [ElementTree][].  However, Sylvain seems to be
10 falling behind as ElementTree and Amara continue to evolve, so I
11 rewrote Atomgen to run off [Amara2][] directly, since Amara's
12 *bindery* interface is wonderful.  Things worked fine when I was
13 installing Amara via `easy_install`:
14
15     sudo apt-get install python-setuptools
16     easy_install --prefix=~ amara
17
18 but I ran into the [wide Unicode][] issues mentioned above when I
19 tried to install Amara2 using Tiziano Müller's [dev-zero][]
20 [overlay][] (Gentoo only packages Amara-1.2.0.2 by default).
21
22 The Amara + [expat][] + wide Unicode is discussed in [Gentoo bug
23 306655][].
24
25 [problems]: http://trac.xml3k.org/ticket/69
26 [lxml]: http://codespeak.net/lxml/
27 [objectify]: http://codespeak.net/lxml/objectify.html
28 [Atomixlib]: http://pypi.python.org/pypi/atomixlib/
29 [Amara]: http://xml3k.org/Amara/
30 [Amara2]: http://xml3k.org/Amara2/
31 [ElementTree]: http://pypi.python.org/pypi/elementtree/
32 [wide Unicode]: http://www.python.org/dev/peps/pep-0261/
33 [dev-zero]: http://git.overlays.gentoo.org/gitweb/?p=dev/dev-zero.git
34 [overlay]: http://www.gentoo.org/proj/en/overlays/userguide.xml
35 [expat]: http://expat.sourceforge.net/
36 [Gentoo bug 306655]: http://bugs.gentoo.org/show_bug.cgi?id=306655