parse.lua

changeset 3
5b24d66365ec
parent 2
5c9d6eba65bc
child 4
0dc2ccd703e3
--- a/parse.lua	Sat Mar 31 22:13:32 2012 +0100
+++ b/parse.lua	Sun Apr 01 01:56:09 2012 +0100
@@ -5,11 +5,7 @@
 for line in io.lines(arg[1] or "gsoc12.csv") do
 	local project = {};
 	csv.read_record(line, function (v) project[#project+1] = v; end);
-	-- FIXME: The original code doesn't work this year,
-	-- I think csv.lua doesn't handle quoted values
-	-- (ie. the 'Tags' column) properly.
-	--local url = project[5]:match("https?://[^\"]+");
-	local url = line:match(",([^,]+)$");
+	local url = project[5] and project[5]:match("https?://[^\"]+");
 	if url and url:match("^http"..(have_https and "s?" or "")..":") then
 		local data, err = http.request(url);
 		if not data then

mercurial