Migrating Pandoc conversors.
This commit is contained in:
parent
ecb4321551
commit
ee80105f44
@ -147,17 +147,10 @@ Pandoc class >> markdownToHtmlOnUnix: inputFile [
|
|||||||
outputFile := inputFile parent / (inputFile basenameWithoutExtension , '.html').
|
outputFile := inputFile parent / (inputFile basenameWithoutExtension , '.html').
|
||||||
outputFile ensureDelete.
|
outputFile ensureDelete.
|
||||||
outputFile ensureCreateFile.
|
outputFile ensureCreateFile.
|
||||||
OSSUnixSubprocess new
|
^ GtSubprocessWithInMemoryOutput new
|
||||||
command: 'pandoc';
|
shellCommand: 'pandoc -f markdown+startnum+task_lists --standalone -t html ', inputFile fullName, ' --output ', outputFile fullName;
|
||||||
arguments: {'-f'. 'markdown+startnum+task_lists'. '--standalone'. '-t'. 'html'. inputFile fullName.
|
runAndWait;
|
||||||
'--output'. outputFile fullName };
|
stdout
|
||||||
redirectStdout;
|
|
||||||
redirectStderr;
|
|
||||||
runAndWaitOnExitDo: [ :process :outString :errString |
|
|
||||||
process isSuccess
|
|
||||||
ifTrue: [ ^ outputFile ]
|
|
||||||
ifFalse: [ ^ inputFile ]
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #converters }
|
{ #category : #converters }
|
||||||
|
Loading…
Reference in New Issue
Block a user