Ikke's Blog

Post details: Article list generation script

Feb 7
Article list generation script

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).

Comments:

No Comments for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))

Categories

Who's Online?

  • Guest Users: 434

Misc

XML Feeds

What is RSS?