4 if src and
#src > 0 then
6 :gsub(
'{{id}}',
meta.id or
default.id)
7 :gsub(
'{{title}}',
meta.title or
default.title)
8 :gsub(
'{{author}}',
meta.author or
default.author)
9 :gsub(
'{{company}}',
meta.company or
default.company)
10 :gsub(
'{{version}}',
meta.version or
default.version)
11 :gsub(
'{{description}}',
meta.description or
default.description)
18 local file_copy =
string.format(
"%s",
file)
19 self.pipeline[#self.pipeline + 1] = function()
20 if not self.loaded then
return self end
23 local file_meta = io.open(file_copy,
'r')
26 local
line = file_meta:read()
32 file_meta = io.open(file_copy,
'w')
34 file_meta:write(content)
40local function
stdout(self, format)
41 local format_copy =
string.format(
"%s", format)
42 if format_copy ==
'json' then
43 format_copy =
'{"id":"{{id}}","title":"{{title}}","company":"{{company}}",'
44 format_copy = format_copy..
'"version":"{{version}}","description":"{{description}}"}'
46 self.pipeline[#self.pipeline + 1] = function()
47 if not self.loaded then
return self end
53local function
pipe(self)
59local function
run(self)
61 while index <= #self.pipeline
do
62 self.pipeline[index]()
69 local gamefile =
game and io.open(
game,
'r')
70 local bytecode = gamefile and gamefile:read(
'*a')
71 local metadata = bytecode and (loadstring and loadstring(bytecode) or
load(bytecode))
77 while type(metadata) ==
'function' do
101 local game_copy =
string.format(
"%s",
game)
local function stdout(self, format)
local application_default
local function replace(src, meta, default)
local function pipe(self)
local function current(game, application)
local function late(game)
local function file(self, file)
local function require(std, game, application)
local function line(x1, y1, x2, y2)