super Template
var name: String
- init(name: String) do self.name = name
var attributes = new Array[String]
var load_exprs = new Array[String]
# Inkscape doesn't give us this information
var page_width = -1
var page_height = -1
- var svg_file = new IFStream.open(drawing)
+ var svg_file = new FileReader.open(drawing)
while not svg_file.eof do
var line = svg_file.read_line
# Query Inkscape
var prog = "inkscape"
- var proc = new IProcess.from_a(prog, ["--without-gui", "--query-all", drawing])
+ var proc = new ProcessReader.from_a(prog, ["--without-gui", "--query-all", drawing])
var min_x = 1000000
var min_y = 1000000
while not proc.eof do
var line = proc.read_line
var words = line.split(",")
-
+
if words.length == 5 then
var id = words[0]
end
# Output source file
- var src_file = new OFStream.open("{src_path}/{drawing_name}.nit")
+ var src_file = new FileWriter.open("{src_path}/{drawing_name}.nit")
nit_src.write_to(src_file)
src_file.close