Changeset

118:3456a6088dc6

clix.publish_atom: Alter Activitystrea.ms argument prefix to --as- and remove IRI prefixing
author Kim Alvefur <zash@zash.se>
date Tue, 08 Oct 2013 14:54:05 +0200
parents 117:d2cb5800ab27
children 119:896a25ed6b1b
files clix/publish_atom.lua
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/clix/publish_atom.lua	Tue Oct 08 14:45:07 2013 +0200
+++ b/clix/publish_atom.lua	Tue Oct 08 14:54:05 2013 +0200
@@ -3,7 +3,6 @@
 
 local xmlns_atom = "http://www.w3.org/2005/Atom";
 local xmlns_activitystreams = "http://activitystrea.ms/spec/1.0/";
-local activitystreams_schema_base = "http://activitystrea.ms/schema/1.0/";
 
 return function (opts, arg)
 	if opts.short_help then
@@ -38,9 +37,9 @@
 		end
 
 		for opt, optval in pairs(opts) do
-			if opt:match"^as_" then
-				atom_entry:tag(opt:sub(4):gsub("_", "-"), { xmlns = xmlns_activitystreams } )
-					:text(activitystreams_schema_base..optval):up();
+			if opt:match"^as%-" then
+				atom_entry:tag(opt:sub(4), { xmlns = xmlns_activitystreams } )
+					:text(optval):up();
 			end
 		end