12 lines
335 B
Smalltalk
12 lines
335 B
Smalltalk
|
Extension { #name : #Pandoc }
|
||
|
|
||
|
{ #category : #'*MiniDocs' }
|
||
|
Pandoc class >> convertString: aString from: inputFormat to: outputFormat [
|
||
|
OSSUnixSubprocess new
|
||
|
shellCommand: 'echo "', aString , '" | pandoc -f ', inputFormat,' -t ', outputFormat;
|
||
|
redirectStdout;
|
||
|
runAndWaitOnExitDo: [ :command :outString |
|
||
|
^ outString
|
||
|
].
|
||
|
]
|