emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [DISCUSSION] Add "Recent News" to orgmode.org


From: Ihor Radchenko
Subject: Re: [DISCUSSION] Add "Recent News" to orgmode.org
Date: Fri, 08 Mar 2024 10:30:09 +0000

Bastien Guerry <bzg@gnu.org> writes:

>> Also, it looks like https://tracker.orgmode.org/index.org does not sort
>> links by date. It would be nice if top 5 links were also the most recent.
>
> Yes, indeed. I'll see when I can hack on this. Help from Clojure
> hackers is welcome here: https://git.sr.ht/~bzg/woof

Something like the attached maybe.

>From 2e170f073ae258d27680baf16f8db1aa2dcf9b78 Mon Sep 17 00:00:00 2001
Message-ID: 
<2e170f073ae258d27680baf16f8db1aa2dcf9b78.1709893748.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Fri, 8 Mar 2024 13:28:12 +0300
Subject: [PATCH] src/bzg/data.clj (get-data): Sort list of entries by date
 (latest first)

Link: 87wmqdxmds.fsf@bzg.fr">https://orgmode.org/list/87wmqdxmds.fsf@bzg.fr
---
 src/bzg/data.clj | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bzg/data.clj b/src/bzg/data.clj
index 99ab66d..333dd6a 100644
--- a/src/bzg/data.clj
+++ b/src/bzg/data.clj
@@ -74,6 +74,8 @@
                     :requests (fetch/requests source-id search)
                     :patches  (fetch/patches source-id search)
                     :news     (fetch/news source-id search))
+        ;; Display the latest first.
+        resources (reverse (sort resources))
         headers   (condp = format
                     "rss"  {"Content-Type" "application/xml"}
                     "md"   {"Content-Type" "text/plain; charset=utf-8"}
-- 
2.43.0

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

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