Archives for: February 2005, 07
02/07/05
I wrote the articles/index.html generation script, using Bash and some sed magic.
This is a sample input file:
Using Glib Signals with GOB_gob-signals
Introducing the Glib Mainloop_glib-mainloop
which outputs the current index.html.
You can find the script here, it's called genindex.sh. The index.html.in file I use as a boilerplate in the end is here, very easy to figure out what's done.
Bash is a really powerful thing, the more scripts I try to write using it, the more I learn.
Of course you could do something like this using PHP, Python or something else, but Bash is much cleaner IMHO (i.e.: you don't need a fully fledged PHP installation to do stuff like this).
Just finished (well, almost) the articles section on my website.
As you can see, the articles are available as PDF now too, although the PDFs aren't formatted very well sometimes (links aren't rendered as real links :-(), need to look into this.
I also need an info page with an explanation of the license, and some copyright information.
The article titles should get the same look as the section links on my homepage, but I cant get them to behave correctly :'(
I'm going to write a PHP script that generates the HTML code you see there from an XML file listing all available articles, too. Will make things much easier for me :-)
I've read some of the GStreamer API docs today, it's a wonderful framework. Prepare for some tutorial ;-)
Next one should be about local (UNIX Domain) sockets, but I think I'll Docbookize the Makefiles tutorial first.
Last night I decided to create a new blog category, where I'll try to give one Docbook-related tip every day, so others can get used to this great format too and start writing documentation or articles using it :-)
I will concentrate on writing "article" files, not "books" or some of the other Docbook classes.
First tip: The standard Docbook Article boilerplate
A Docbook document is an SGML or XML file. Writing SGML can be a tedious task, so most users write their documents in XML.
This is the standard boilerplate for a Docbook XML article:
<?xml version="1.0"?> <!DOCTYPE article PUBLIC "-//OASIS/DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> <article id="sometitle" lang="en"> Document goes here </article>