diff --git a/repository/Grafoscopio/GrafoscopioNode.class.st b/repository/Grafoscopio/GrafoscopioNode.class.st index b9f0790..a712d11 100644 --- a/repository/Grafoscopio/GrafoscopioNode.class.st +++ b/repository/Grafoscopio/GrafoscopioNode.class.st @@ -519,9 +519,14 @@ GrafoscopioNode >> htmlToMarkdown [ markdownFile := FileLocator temp asFileReference / 'body.markdown'. markdownFile ensureDelete. htmlFile writeStreamDo: [:out | out nextPutAll: self body ]. - OSProcess - waitForCommand: 'pandoc -f html -t markdown --atx-headers ', - htmlFile fullName, ' -o ', markdownFile fullName. + Smalltalk platformName = 'unix' + ifTrue: [ OSProcess + waitForCommand: 'pandoc -f html -t markdown --atx-headers ', + htmlFile fullName, ' -o ', markdownFile fullName ]. + Smalltalk platformName = 'Win32' + ifTrue: [ WindowsProcess + waitForCommand: 'pandoc -f html -t markdown --atx-headers ', + htmlFile fullName, ' -o ', markdownFile fullName ]. self body: markdownFile contents. htmlFile ensureDelete. markdownFile ensureDelete. diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index a7acdb1..74bbe26 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -187,7 +187,10 @@ GrafoscopioNotebook >> exportAsHTML [ self exportAsMarkdown. htmlFile := self markdownFile parent fullName,'/', self markdownFile basenameWithoutExtension, '.html'. htmlFile asFileReference exists ifTrue: [ htmlFile asFileReference delete ]. - OSProcess command: 'pandoc --standalone ', self markdownFile fullName, ' -o ', htmlFile. + Smalltalk platformName = 'unix' + ifTrue: [OSProcess command: 'pandoc --standalone ', self markdownFile fullName, ' -o ', htmlFile]. + Smalltalk platformName = 'Win32' + ifTrue: [WindowsProcess command: 'pandoc --standalone ', self markdownFile fullName, ' -o ', htmlFile]. self inform: ('File exported as: ', String cr, htmlFile). ] @@ -225,7 +228,8 @@ GrafoscopioNotebook >> exportAsPDF [ pandocCommand := 'cd ', self markdownFile parent fullName,'; ', 'pandoc ', self pandocOptionsComputed, ' ', self markdownFile fullName, ' -o ', self pdfFile fullName. - ExternalOSProcess command: pandocCommand. + Smalltalk platformName = 'unix' ifTrue: [ ExternalOSProcess command: pandocCommand ]. + Smalltalk platformName = 'Win32' ifTrue: [ WindowsProcess command: pandocCommand ]. self inform: ('File exported as: ', String cr, self pdfFile fullName) ]