Software /
code /
clix
Changeset
117:d2cb5800ab27
clix.publish_atom: Set type attribute on title, summary and content from --FIELD-type arguments
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 08 Oct 2013 14:45:07 +0200 |
parents | 116:8bb289b2b7be |
children | 118:3456a6088dc6 |
files | clix/publish_atom.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/clix/publish_atom.lua Fri Jul 12 04:16:46 2013 +0200 +++ b/clix/publish_atom.lua Tue Oct 08 14:45:07 2013 +0200 @@ -25,16 +25,16 @@ local entry_id = opts.id or new_uuid(); local atom_entry = verse.stanza("entry", { xmlns = xmlns_atom}) :tag("id"):text(entry_id):up() - :tag("title"):text(opts.title or ""):up() + :tag("title", { type = opts["title-type"] }):text(opts.title or ""):up() :tag("updated"):text(opts.updated or datetime()):up(); atom_entry:tag("author"):tag("name"):text(opts.author or os.getenv("USER") or "Unknown author"):up(); atom_entry:up(); if opts.summary then - atom_entry:tag("summary"):text(opts.summary):up(); + atom_entry:tag("summary", { type = opts["summary-type"] }):text(opts.summary):up(); end if opts.content then - atom_entry:tag("content"):text(opts.content):up(); + atom_entry:tag("content", { type = opts["content-type"] }):text(opts.content):up(); end for opt, optval in pairs(opts) do