orrg

online rss & atom feed reader for gemini
git clone https://git.clttr.info/orrg.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 17fb028c7177296e19bfc4c5ae18b04b5e82a27d
parent a354cf94d629843e4a3f17fe9d48ad3ea4d89ba4
Author: René Wagner <rwagner@rw-net.de>
Date:   Thu, 17 Dec 2020 17:05:49 +0100

avoid title/desc duplicates

Diffstat:
Morrg.pl | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/orrg.pl b/orrg.pl @@ -69,13 +69,13 @@ sub item $title =~ s/\s+$//ig; $link =~ s/^\s+//ig; $link =~ s/\s+$//ig; - push @item, ($it->description ne '' || $it->pubDate ne '')? '## '. $title : $title; + push @item, (($it->description ne '' && $it->description ne $it->title) || $it->pubDate ne '')? '## '. $title : $title; if ($it->pubDate ne '') { my $dt = DateTime::Format::ISO8601->parse_datetime($it->pubDate); push @item, 'published '. strftime('%Y-%m-%dT%H:%M:%SZ', gmtime($dt->epoch)); push @item, ''; } - if ($it->description ne '') { + if ($it->description ne '' && $it->description ne $it->title) { my $desc = $it->description; $desc =~ s/\<li\>/* /igm; $desc =~ s/\<h[1-2][^\>]+\>/### /igm;