Differences From
Artifact [53cfafaa7c]:
3 3 -- copies them into a data structure we can then
4 4 -- create templates from when we return to terra
5 5 local path = ...
6 6 local sources = {
7 7 'docskel';
8 8 'tweet';
9 9 'profile';
10 + 'compose';
11 + 'login-username';
12 + 'login-challenge';
10 13 }
11 14
12 15 local ingest = function(filename)
13 16 local hnd = io.open(path..'/'..filename)
14 17 local txt = hnd:read('*a')
15 18 io.close(hnd)
16 19 txt = txt:gsub('([^\\])!%b[]', '%1')
................................................................................
18 21 txt = txt:gsub('\\(!%b[])', '%1')
19 22 txt = txt:gsub('\\(!!)', '%1')
20 23 return txt
21 24 end
22 25
23 26
24 27 local views = {}
25 -for _,n in pairs(sources) do views[n] = ingest(n .. '.tpl') end
28 +for _,n in pairs(sources) do views[n:gsub('-','_')] = ingest(n .. '.tpl') end
26 29 return views