Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > dce44b87bedd2a40f57018f4757e5bb0 > files > 58

enigma-1.01-12.i686.rpm

#!/usr/bin/env lua
-- Simple converter for Enigma lua (xml ready) level to xml (utf-8) level
-- Copyright (c) 2006 Ronald Lamprecht
-- License: GPL2
-- Usage: lua lua2xml.lua level.lua > level.xml
-- Requires Lua 5.0 or abovestdout = io.output()
stdout = io.output()
for line in io.lines(arg[1]) do
    if (string.find(line,"--xml-- ",1,true) == 1) then
        stdout:write(string.sub(line, 9) .. "\n" )
    else
        stdout:write(line .. "\n" )
    end
end