22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/isodoc/headlesshtml_convert.rb', line 22
def convert(input_filename, file = nil, debug = false, output_filename = nil)
file = File.read(input_filename, encoding: "utf-8") if file.nil?
@openmathdelim, @closemathdelim = (file)
docxml, filename, dir = convert_init(file, input_filename, debug)
result = convert1(docxml, filename, dir)
return result if debug
postprocess(result, "#{filename}.tmp.html", dir)
FileUtils.rm_rf dir
strip_head("#{filename}.tmp.html",
output_filename || "#{filename}.#{@suffix}")
FileUtils.rm_rf ["#{filename}.tmp.html", tmpimagedir]
end
|