19 print("","--summary=\"To be, or not to be: that is the question\""); |
19 print("","--summary=\"To be, or not to be: that is the question\""); |
20 return 0; |
20 return 0; |
21 end |
21 end |
22 local function on_connect(conn) |
22 local function on_connect(conn) |
23 -- Required: id, title, updated, author (which must have a name) |
23 -- Required: id, title, updated, author (which must have a name) |
24 local entry_id = opts.entry_id or ("clix-"..new_uuid()); |
24 local entry_id = opts.id or new_uuid(); |
25 local atom_entry = verse.stanza("entry", { xmlns = xmlns_atom}) |
25 local atom_entry = verse.stanza("entry", { xmlns = xmlns_atom}) |
26 :tag("id"):text(entry_id):up(id) |
26 :tag("id"):text(entry_id):up(id) |
27 :tag("title"):text(opts.title or ""):up() |
27 :tag("title"):text(opts.title or ""):up() |
28 :tag("updated"):text(opts.updated or datetime()):up(); |
28 :tag("updated"):text(opts.updated or datetime()):up(); |
29 atom_entry:tag("author"):tag("name"):text(opts.author or os.getenv("USER") or "Unknown author"):up(); |
29 atom_entry:tag("author"):tag("name"):text(opts.author or os.getenv("USER") or "Unknown author"):up(); |