How to extract links from a HTML page using XSL

A small XSL template to extract all the links from a HTML page:

<?xml version=”1.0″ encoding=”UTF-8″?>
<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”>
<xsl:output indent=”yes”/>

<xsl:template match=”/”>
<html>
<head>
<title>Link List</title>
</head>
<body>
<p>
<ul>
<xsl:for-each select=”//li”>
<xsl:copy-of select=”.”/>
</xsl:for-each>
</ul>
</p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

To use it, install libxslt-bin in fink or xsltproc in debian, and execute the following line:

xsltproc filter.xsl index.html

Debian governance model

Each open source project has its own governance model. Some are more hierarchical than others and some are more flat. OSS Watch is preparing a document about different examples of Open Source Governance Models. This is the part related with Debian that I wrote some weeks ago:

The project Debian tries to create a Linux based distribution and I think there is little need to introduce the project further. Debian is the heart of the Ubuntu distribution.

The governance model in Debian is motivated to create a strong democratic model. The hierarchy inside the community is intended to be mostly flat. All the members of the Debian organisation, called Debian Developers, have the same rights (with a few exceptions). Developers join Debian through a convoluted process of interview (including technical and philosophical aspects), GPG keysignings and apprenticeship. Candidates need aslo an advocate inside the organization to recommend them.

The reason for this strict procedure lies in Debian packages being installed in computers with root privileges. Packages may maliciously or accidentally cause important harm. The admission process is intended to test both philosophical ideas and technical skills of the candidates.

However this strict process has made necessary a new role inside the project: Debian Maintainers. A Debian Maintainers are people who are not full developers but have a restricted ability to upload packages to the Debian archive. They need to be advocate to sponsor them and have limited rights inside the project and they cannot vote on project decisions.

Developers select one of their number as project leader annually. Project leader delegates responsibility for different roles within the project. Tension exists because many developers have been in role since before leaders were elected. The Debian Social Contract and the Debian Free Software Guidelines are the central documents guiding the community and everyone should agree those document before joining the community.

More information:

How to compile Tomboy in Mac OS X

I have created a lot of different notes using Tomboy. However there is no version out there to use tomboy in a mac. These are the steps needed to compile it in a Mac OS X machine.

The first thing you need is a working copy of Fink and a X11 server. You can find instructions to install fink in its webpage and you can find the X11 server in your Mac OS X installation disk.

Before starting, you need to install some dependences to compile Tomboy. Just type in your terminal:

$ fink install mono mono-dev
$ fink install gtk+2 gtk+2-dev atk1 atk1-shlibs pango1-xft2 pangoxsl-shlibs
	libgnomeprint2.2 libgnomeprintui-2.2
$ fink install dbus dbus-dev dbus-shlibs
$ fink install gtkspell2-shlibs gtkspell2  gtkspell2-dev

This will take a long time, so relax and have a cup of tea.

There is another dependency that is not included in Fink, DBusSharp. Download ndesk-dbus and ndesk-dbus-glib, and move the files to your source directory. Then compile each one:

$ tar xvfz ndesk-dbus-0.6.0.tar.gz
$ cd ndesk-dbus-0.6.0
$ ./configure --prefix=/Users/pablo/sw/
$ make
$ make install
$ cd ..
$ tar xvfz ndesk-dbus-glib-0.4.1.tar.gz
$ cd ndesk-dbus-glib-0.4.1
$ export PKG_CONFIG_PATH=/Users/pablo/sw/lib/pkgconfig:/sw/lib/pkgconfig
$ ./configure  --prefix=/Users/pablo/sw/
$ make
$ make install

I usually prefer to keep the programs I compile inside my $HOME (/Users/pablo/sw in my case). I you want to put those files in any other place just change the directory in the lines above to the proper one.

Now your system should be ready to install the lastest version of Tomboy. I am using the version 0.12.0, as it is the last one available right now. Download it and move it to your source directory.

$ tar xvfz tomboy-0.12.0.tar.gz
$ cd tomboy-0.12.0

Fink is sometimes a little bit tricky, so it is also necessary to tell pkg-config what version of pango we want to use as the last one is not in the default location.

$ export PKG_CONFIG_PATH=/Users/pablo/sw/lib/pkgconfig:/sw/lib/pkgconfig:
	/sw/lib/pango-ft219/lib/pkgconfig/
$ ./configure  --prefix=/Users/pablo/sw/

The version I am using does not detect msgfmt automatically, so you need to edit the file po/Makefile,

emacs  po/Makefile

look for the line:

GMSGFMT =
and replace it with
GMSGFMT = /sw/bin/msgfmt

At this point it is only necessary to compile tomboy using make:

$ make
$ make install

Now Tomboy is ready to use. Just type tomboy in your terminal.

If you don’t like the default theme (nobody likes it) you can use any other gtk+ theme. For example, install the glossy theme with:

$ fink install gnome-themes-glossy-p-0.0-2

and follow the instructions of http://pdb.finkproject.org/pdb/package.php/gnome-themes-glossy-p.

Linux Kernel Development

I have published this blog post into OSS Watch team blog.

A couple of months ago, Greg Kroah-Hartman gave a talk at Google Tech Talks with the title: “The Linux Kernel, who is developing it, how they are doing it, and why you should care”. Greg is one of the main Linux developers and he is a maintainer for the USB driver core, sysfs, and debugfs subsystems of the kernel. He also works for Novell in the SUSE Labs division.

During the talk Greg provided some interesting highlights about the real process of the kernel development. The kernel’s source code contains about 9.2 million lines. This has been increasing at a rate of approximately 10% each year since version 2.6.0. On an average day during the last year:

  • 4,300 lines were added,
  • 1,800 lines were removed,
  • 1,500 lines were modified.

This is one of the most impressive software projects ever undertaken, as he said, with 2399 unique contributors in the last year and a half. To manage a project of this size, the community of developers has broken almost every rule of software engineering with more changes per hour and per release than anyone would have thought was possible. The result is extraordinary: Linux is able to support more devices and more processors than any other OS in history.

The clear governance structure within the contributing community allowed this to happen. The structure used inside the development team is highly distributed, similar to a communication network. Instead of using a strict hierarchy, with maintainers for particular pieces of code, in the Linux kernel any contributor could modify any part of the code. If something needs to be fixed, anyone can do it. If a particular developer is on holiday it is not necessary to wait for him to return. All the changes can be routed through any other developer, as happens in a communication network when some of the nodes are unavailable. This is quite different to the normal process inside closed companies.

However, one of the most interesting highlights during his talk was about who is working in the kernel. Roughly 75% of the work is done by people who are paid to do so. This refutes the myth that all OSS projects are supported by volunteer contributions, although an important part of the work is done by volunteers that are not directly paid to do so. Half of the contributors have only contributed one patch, whilst 30 people do nearly a third of the work.

The number of companies sponsoring developers is going up. The numbers presented by Greg indicate that Red Hat is the most active company (with 11.6% of the work), followed by IBM (7.5%), Novell (6.6%), and Intel (4.1%).

The complete talk is available online and Greg maintains more information in his blog. An article with some of the most important numbers from the talk can be found at the Linux Foundation web page.

Original blog post.

No a las patentes de software

Llevamos ya un tiempo dando la brasa con este tema, pero todavía no ha pasado el peligro. Tras una jugarreta del consejo europeo las patentes de software deben ser votadas de nuevo. Ya no es necesario que os hable de las patentes y del proceso que se ha seguido, ahora toca movilizarse, por ejemplo cerrando tu página web con una página tipo. La mía ya está cerrada, ¿y la tuya?

No a las patentes software

Hoy se ha convocado una movilización en contra de las patentes de software. A dicha movilización se han unido multitud de universidades españolas, entre ellas la Universidad Rey Juan Carlos. En ella hay prevista una charla del profesor Jesús González Barahona que podrá seguirse en streaming en la red.

Hay más información en Proinnova y barrapunto.

Nos vemos en la movilización.