Draft of archive_news.pl script

Jeroen Coumans jeroen at linuxfromscratch.org
Mon Aug 25 11:44:29 PDT 2003

Hi Jeroen Coumans. You said the following on 08/25/03 16:04:
> Hi Anderson Lizardo. You said the following on 08/25/03 04:11:
>> I've attached a tar.gz file with the following files:
> <snip>
>> Some observations/issues:
>> - The links on the website (including that on the news contents) are 
>> relative URIs. Because of this, some links will become broken on the 
>> news archives. As a workaround, I inserted a <base href="../../" /> 
>> tag on the archive-top.html file. But now, fragment links to the 
>> current file, like "#header", will not work.
> Can the relative URL's be converted to static URL's in the script? This 
> should make all links work again.
>> - This is a crude hack, and I recommend we use the method described in 
>> http://archives.linuxfromscratch.org/mail-archives/website/2003-August/000469.html. 
>> This script can be adapted to convert the current news to this format, 
>> and I could write a script to parse it.
> Yes please, the above method is a lot better and also automates news 
> page creation.  BTW I assume that method allows for multiple <p>'s? It 
> wasn't really clear from your mail. And the above method will also 
> automate the news page generation, right? (save for the scripts to 
> generate them, but I can write those myself)
> I'll take care of creating the {project}/news.txt and the respective 
> news/archive templates so you can focus on the script.
>> The lessons (or lectures?) at university begin tomorrow, so I will 
>> have less time to work on LFS (basically, only weekends). But, as I 
>> can see, the most important things on TODO (needed for page launch) 
>> are done. :-)
> Good luck! Mine start next week, which leaves this week free to work on 
> the last issues like the hardcoded templates. Just waiting to test them...
> BTW we can mail lfs-chat to see if there are other perl-coders willing 
> to work on this if your time is that limited...?

BTW I updated the http://test.linuxfromscratch.org/website.html#todo for 
the newsarchiving. Hopefully it's all clear and implementable :)

I also suggest that once your script is updated to the new format, we 
rename generalnews.txt to the projectnews-YYYY.txt format, so it would 
become www/test/projectnews-2003.txt

Also, do you have a method to automatically create the news id and a 
link to a permanent location of that id? Example:

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

Would become the following rendered xhtml snippet:

<h3 id="newstitle"><a 
<h4>Author Name - date</h4>
<p>The news content, in XHTML format, goes here</p>
<p>More content</p>

Hopefully we have worked out (documented) all issues concerning the 
archiving now, except for the implementation of it all.

Jeroen Coumans (jeroen at linuxfromscratch.org)
FAQ: http://www.linuxfromscratch.org/faq (faq at linuxfromscratch.org)
Website: http://test.linuxfromscratch.org (website at linuxfromscratch.org)

More information about the website mailing list