News archiving

Anderson Lizardo andersonlizardo at
Sat Aug 23 08:38:35 PDT 2003

Anderson Lizardo wrote:
> This method has at least one issue: the field containing the news
> item content (<description>...</description>, in case of RSS), will
> have to be all entity-encoded.

To resolve this, the "database" file can have the following structure, 
instead of XML (we can call it, for example, news.txt):

title: News title
author: Author Name
date: 2003/08/23
<p>The news content, in XHTML format, goes here</p>

title: Another news
author: Me
date: 2003/08/21
<p>The news content, in XHTML format, goes here</p>

The most recent news goes on top. We can have the following files:

www/test/news.txt (general news)
www/test/lfs/news.txt (lfs-specific news)

and so on.

It's easy to write a Perl script the extracts the 5 most recent news of 
each section (lfs,blfs,alfs,etc.) and archive the rest.

Jeroen, are you comfortable with this format? If you want something like 
this, I can write a script to convert the existing news to this format 
(It's just a matter of modifying the script).

Jeremy, are you interested in helping me on this? You can send me some 
code and/or ideas... ;-)
Anderson Lizardo

Desafio AntiZona: participe do jogo de perguntas e respostas que vai
dar um Renault Clio, computadores, câmeras digitais, videogames e muito

More information about the website mailing list