File: lua2xml

package info (click to toggle)
enigma 1.30%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 76,132 kB
  • sloc: xml: 162,251; cpp: 67,393; ansic: 28,606; makefile: 1,986; sh: 1,298; yacc: 288; perl: 84; sed: 16
file content (14 lines) | stat: -rw-r--r-- 462 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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