23 local entry_id = opts.entry_id or ("clix-"..new_uuid()); |
23 local entry_id = opts.entry_id or ("clix-"..new_uuid()); |
24 local atom_entry = verse.stanza("entry", { xmlns="http://www.w3.org/2005/Atom" }) |
24 local atom_entry = verse.stanza("entry", { xmlns="http://www.w3.org/2005/Atom" }) |
25 :tag("id"):text(entry_id):up(id) |
25 :tag("id"):text(entry_id):up(id) |
26 :tag("title"):text(opts.title or ""):up() |
26 :tag("title"):text(opts.title or ""):up() |
27 :tag("updated"):text(opts.updated or datetime()):up(); |
27 :tag("updated"):text(opts.updated or datetime()):up(); |
28 atom_entry:tag("author"):tag("name"):text(opts.author or "Unknown author"):up(); |
28 atom_entry:tag("author"):tag("name"):text(opts.author or os.getenv("USER") or "Unknown author"):up(); |
29 atom_entry:up(); |
29 atom_entry:up(); |
30 if opts.summary then |
30 if opts.summary then |
31 atom_entry:tag("summary"):text(opts.summary):up(); |
31 atom_entry:tag("summary"):text(opts.summary):up(); |
32 end |
32 end |
33 |
33 |