clix.publish_atom: Use the $USER environment variable as fallback for author.

Sun, 19 Feb 2012 23:51:05 +0100

author
Kim Alvefur <zash@zash.se>
date
Sun, 19 Feb 2012 23:51:05 +0100
changeset 72
0f69e1902f5b
parent 71
075ecfa46484
child 73
1032eddcf35b

clix.publish_atom: Use the $USER environment variable as fallback for author.

clix/publish_atom.lua file | annotate | diff | comparison | revisions
--- a/clix/publish_atom.lua	Sun Feb 19 23:50:09 2012 +0100
+++ b/clix/publish_atom.lua	Sun Feb 19 23:51:05 2012 +0100
@@ -25,7 +25,7 @@
 			:tag("id"):text(entry_id):up(id)
 			:tag("title"):text(opts.title or ""):up()
 			:tag("updated"):text(opts.updated or datetime()):up();
-		atom_entry:tag("author"):tag("name"):text(opts.author or "Unknown author"):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();

mercurial