parsav  Diff

Differences From Artifact [53cfafaa7c]:

To Artifact [1503c625ad]:


3
4
5
6
7
8
9



10
11
12
13
14
15
16
..
18
19
20
21
22
23
24
25
26
-- copies them into a data structure we can then
-- create templates from when we return to terra
local path = ...
local sources = {
	'docskel';
	'tweet';
	'profile';



}

local ingest = function(filename)
	local hnd = io.open(path..'/'..filename)
	local txt = hnd:read('*a')
	io.close(hnd)
	txt = txt:gsub('([^\\])!%b[]', '%1')
................................................................................
	txt = txt:gsub('\\(!%b[])', '%1')
	txt = txt:gsub('\\(!!)', '%1')
	return txt
end


local views = {}
for _,n in pairs(sources) do views[n] = ingest(n .. '.tpl') end
return views







>
>
>







 







|

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
21
22
23
24
25
26
27
28
29
-- copies them into a data structure we can then
-- create templates from when we return to terra
local path = ...
local sources = {
	'docskel';
	'tweet';
	'profile';
	'compose';
	'login-username';
	'login-challenge';
}

local ingest = function(filename)
	local hnd = io.open(path..'/'..filename)
	local txt = hnd:read('*a')
	io.close(hnd)
	txt = txt:gsub('([^\\])!%b[]', '%1')
................................................................................
	txt = txt:gsub('\\(!%b[])', '%1')
	txt = txt:gsub('\\(!!)', '%1')
	return txt
end


local views = {}
for _,n in pairs(sources) do views[n:gsub('-','_')] = ingest(n .. '.tpl') end
return views