From 4bd4cb578ee4579eaa81efec4b478654fae8e236 Mon Sep 17 00:00:00 2001 From: pdp8 Date: Sat, 24 Feb 2024 11:19:13 +0100 Subject: rss.rb: dc:date removed, guid added --- rss.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/rss.rb b/rss.rb index 47b47c0..554d45c 100755 --- a/rss.rb +++ b/rss.rb @@ -10,9 +10,10 @@ items = [] items << { title: File.basename(dir).split('_')[1..-1].join(' '), link: File.join('https://pdp8.info', cat + '.html#' + date), + guid: File.join('https://pdp8.info', cat + '.html#' + date), description: File.read(File.join(dir, 'README')).chomp.sub(/^\n/, '').sub("\n\n", "\n"), - pubDate: updated.httpdate, - 'dc:date' => updated.rfc3339 + pubDate: updated.httpdate + # 'dc:date' => updated.rfc3339 } end end @@ -21,14 +22,14 @@ updated = Date.parse(date) # .strftime('%Y%m%d') items << { title: 'pictures', link: 'https://pdp8.info/pictures.html', - pubDate: updated.httpdate, - 'dc:date' => updated.rfc3339 + guid: 'https://pdp8.info/pictures.html', + pubDate: updated.httpdate + # 'dc:date' => updated.rfc3339 } xml = [' pdp8 https://pdp8.info @@ -36,9 +37,9 @@ xml = [' en'] date = DateTime.now xml << " #{date.httpdate}" -xml << " #{date.rfc3339}" +# xml << " #{date.rfc3339}" -items.sort_by { |i| i['dc:date'] }.each do |item| +items.sort_by { |i| i['pubDate'] }.each do |item| xml << ' ' item.each do |k, v| xml << " <#{k}>#{v}" -- cgit v1.2.3