Patched 'Save as...' to support pandoc as an external program.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2014-11-15 19:01:14 +00:00
parent d0b9885fdf
commit f89d088de6

View File

@ -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 ]
]