Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 57d4d445d4dcdf3e10590f47dac4f123 > files > 58

enigma-1.01-12.x86_64.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