diff options
author | Eric Wong <e@80x24.org> | 2023-11-10 03:09:59 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-11-10 18:42:09 +0000 |
commit | 363c043a8a3f379a69802fc566112fcd8f1e750c (patch) | |
tree | 81661cb93fca46832223ccb150e1bb1aafc10c96 /lib/PublicInbox/WwwAtomStream.pm | |
parent | f3133719702954356caa3de4c7c26c667f1094d8 (diff) | |
download | public-inbox-363c043a8a3f379a69802fc566112fcd8f1e750c.tar.gz |
This seems like a easy (but WWW-specific) way to get recently created and recently active topics as suggested by Konstantin. To do this with Xapian will require a new columns and reindexing; and I'm not sure if the current lei handling of search results by dumping results to a format readable by common MUAs would work well with this. A new TUI may be required... Suggested-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org> Link: https://public-inbox.org/meta/20231107-skilled-cobra-of-swiftness-a6ff26@meerkat/
Diffstat (limited to 'lib/PublicInbox/WwwAtomStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwAtomStream.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm index 737cc6cb..26b366f5 100644 --- a/lib/PublicInbox/WwwAtomStream.pm +++ b/lib/PublicInbox/WwwAtomStream.pm @@ -99,15 +99,16 @@ sub atom_header { $base_url .= '?' . $search_q->qs_html(x => undef); $self_url .= '?' . $search_q->qs_html; $page_id = to_uuid("q\n".$query); + } elsif (defined(my $cat = $ctx->{topic_category})) { + $title = title_tag("$cat topics - ".$ibx->description); + $self_url .= "topics_$cat.atom"; } else { $title = title_tag($ibx->description); $self_url .= 'new.atom'; - if (defined(my $addr = $ibx->{-primary_address})) { - $page_id = "mailto:$addr"; - } else { - $page_id = to_uuid($self_url); - } + my $addr = $ibx->{-primary_address}; + $page_id = "mailto:$addr" if defined $addr; } + $page_id //= to_uuid($self_url); qq(<?xml version="1.0" encoding="us-ascii"?>\n) . qq(<feed\nxmlns="http://www.w3.org/2005/Atom"\n) . qq(xmlns:thr="http://purl.org/syndication/thread/1.0">) . |