-
-
Save dv/48bffc4877009a8c904ab61e4de7370b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This runs: | |
escaped_out = "/var/folders/h3/286_8q714zzbrsyt55xjqyn00000gn/T/d20160705-68336-ib6zho" | |
escaped_doc = "/var/folders/h3/286_8q714zzbrsyt55xjqyn00000gn/T/small_analytic.xls20160705-68336-1fuvhtn.xls" | |
office_executable = '/Applications/LibreOffice.app/Contents/MacOS/soffice' | |
options = "--headless --invisible --norestore --nolockcheck --convert-to csv:\"Text - txt - csv (StarCalc)\" --outdir #{escaped_out} #{escaped_doc}" | |
cmd = "#{office_executable} #{options}" | |
result, error, pid = Open3.capture3(custom_env, cmd) | |
# This fails: | |
options = [ | |
'--headless', | |
'--invisible', | |
'--norestore', | |
'--nolockcheck', | |
'--convert-to', 'csv:Text - txt - csv (StarCalc)', | |
'--outdir', escaped_out, | |
escaped_doc, | |
] | |
result, error, pid = Open3.capture3(custom_env, office_executable, *options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment