comparison mod_pubsub_feeds/feeds.lib.lua @ 4428:b328ca621ba6

mod_pubsub_feeds: Translate RSS <enclosure> to Atom for podcasts
author Kim Alvefur <zash@zash.se>
date Thu, 04 Feb 2021 20:49:02 +0100
parents c402b273f2e3
children
comparison
equal deleted inserted replaced
4427:c402b273f2e3 4428:b328ca621ba6
8 atom_entry:tag("title"):text(tag:get_text()):up(); 8 atom_entry:tag("title"):text(tag:get_text()):up();
9 end 9 end
10 10
11 function rss2atom.link(atom_entry, tag) 11 function rss2atom.link(atom_entry, tag)
12 atom_entry:tag("link", { href = tag:get_text() }):up(); 12 atom_entry:tag("link", { href = tag:get_text() }):up();
13 end
14
15 function rss2atom.enclosure(atom_entry, tag)
16 atom_entry:tag("link", { rel = "enclosure", href = tag.attr.url, type = tag.attr.type, length = tag.attr.length }):up();
13 end 17 end
14 18
15 function rss2atom.author(atom_entry, tag) 19 function rss2atom.author(atom_entry, tag)
16 atom_entry:tag("author") 20 atom_entry:tag("author")
17 :tag("email"):text(tag:get_text()):up() 21 :tag("email"):text(tag:get_text()):up()