From f89d088de6094c0bf4c552f1ecdc2b3d1560021b Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 15 Nov 2014 19:01:14 +0000 Subject: [PATCH] Patched 'Save as...' to support pandoc as an external program. --- repository/Grafoscopio/GrafoscopioBrowser.class.st | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index 323ed28..dec8e2d 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -276,7 +276,9 @@ GrafoscopioBrowser >> exportAsHtml [ Smalltalk platform name = 'unix' ifTrue: [ OSProcess command: 'exec ', pandoc, ' ', markdownFileLocation , ' --standalone -o ' , htmlFileLocation. - self inform: 'Archivo exportado como html'. ]. + OSProcess command: 'exec echo "exportando como html"'. + self inform: 'Archivo exportado como html en: ', htmlFileLocation. + self inform: pandoc]. Smalltalk platform name = 'Win32' ifTrue: [ OSProcess command: pandoc, ' ', markdownFileLocation , ' --standalone -o ' , htmlFileLocation ]] ifFalse: [self configurePandoc ]. @@ -424,7 +426,7 @@ GrafoscopioBrowser >> repositoryCredentials [ GrafoscopioBrowser >> saveToFile [ "Saves the current tree to a file" - | file writeStream | + | file writeStream markdownFile | file := UITheme builder fileSave: 'Guardar archivo como...' @@ -435,7 +437,9 @@ GrafoscopioBrowser >> saveToFile [ writeStream := file writeStream. workingFile := writeStream name asFileReference. - [ self exportAsSton: mainTree on: writeStream ] + markdownFile := (workingFile parent) / (workingFile basenameWithoutExtension, '.markdown'). + [ self exportAsSton: mainTree on: writeStream. + self exportAsMarkdown: mainTree on: markdownFile ] ensure: [ writeStream ifNotNil: #close ] ]