octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird NEWS on the OF website


From: Carnë Draug
Subject: Re: Weird NEWS on the OF website
Date: Thu, 14 Jul 2016 16:57:58 +0100

On 14 July 2016 at 14:52, Julien Bect <address@hidden> wrote:
> http://octave.sourceforge.net/index.html
>
> It seems that the news entries are sorted according to month and day of
> release, ignoring the actual release *year*...
>

That is not the issue.  The problem is that the latest news is actual
repeated text from the news archive.  And it is also repeated on the
website repository [1].  When a release is made, there is a script that
adds an entry to the news archive, the same to the latest news, and then
removes the last on the latest news.  However, nothing changes on the
website repository.

Recently, I have updated the website and some changes were to the
index.html page.  When that happened, it reset the latest news.
This should probably be done in a nicer way, but I don't want to
have the project-web repository full of commits about package
release dates.

Here's the existing code that handles the news if anyone is interested:

    ## piece of text in the NEWS file that marks were to insert news
    news_start_token='<!--New news go here-->'
    news_final_token='<!--News end here-->'

    date=$(date "+%B %d, %Y")
    replacement="$news_start_token\n<dt>$date<\/dt>\n<dd>\n<p>$name-$version
released<\/p>\n<\/dd>"

    sed -i.bak "s/$news_start_token/$replacement/" "./NEWS.html"
    sed -i.bak "s/$news_start_token/$replacement/" "./index.html"
    cp "./index.html" "./index.html.bak"
    tac "./index.html.bak" | sed
"/$news_final_token/,/<\/dt>/c\\$news_final_token" | tac >
"./index.html"

The best fix I think would be to after a release, extract the top X
entries of the news archive into a separate file, and then have
index.html display that.  If anyone is interested in fix it, please
do so.

Carnë

[1] http://hg.code.sf.net/p/octave/project-web



reply via email to

[Prev in Thread] Current Thread [Next in Thread]