Adding platform specific commands for exportation before testing on Windows.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2020-10-09 13:22:59 -05:00
parent b679e231ec
commit f3458babb6

View File

@ -72,17 +72,18 @@ Markdown >> exportMetadataAsJson [
in '.local/share/Grafoscopio/Scripts' should be developed in the near future." in '.local/share/Grafoscopio/Scripts' should be developed in the near future."
| output luaScript | | output luaScript |
luaScript := FileLocator home / '.local/share/Brea/scripts/meta-to-json.lua'. luaScript := FileLocator home / '.local/share/Brea/scripts/meta-to-json.lua'.
OSSUnixSubprocess new Smalltalk platformName = 'unix' ifTrue: [
workingDirectory: self file parent fullName; OSSUnixSubprocess new
command: 'pandoc'; workingDirectory: self file parent fullName;
arguments: { '--lua-filter=', luaScript fullName . self file basename }; command: 'pandoc';
redirectStdout; arguments: { '--lua-filter=', luaScript fullName . self file basename };
redirectStdin; redirectStdout;
runAndWaitOnExitDo: [ :process :outString :errString | redirectStdin;
output := process isSuccess runAndWaitOnExitDo: [ :process :outString :errString |
ifTrue: [ outString ] output := process isSuccess
ifFalse: [ errString ] ifTrue: [ outString ]
]. ifFalse: [ errString ]
]].
^ output correctAccentedCharacters ^ output correctAccentedCharacters
] ]