Sync before Data Week 11.
This commit is contained in:
parent
38f04c2996
commit
11817641a7
@ -751,7 +751,8 @@ GrafoscopioNode >> metadata [
|
||||
GrafoscopioNode >> metadataAsYamlIn: markdownStream [
|
||||
"I convert the first '%metadata' node into a YAML preamble contents to be used by Pandoc
|
||||
exportation."
|
||||
self metadata
|
||||
self metadata
|
||||
ifNil: [ markdownStream nextPutAll: String crlf. ]
|
||||
ifNotNil: [
|
||||
self metadata
|
||||
keysAndValuesDo: [ :k :v |
|
||||
|
@ -189,10 +189,18 @@ GrafoscopioNotebook >> exportAsHTML [
|
||||
htmlFile := self markdownFile parent fullName,'/', self markdownFile basenameWithoutExtension, '.html'.
|
||||
htmlFile asFileReference exists ifTrue: [ htmlFile asFileReference delete ].
|
||||
Smalltalk platformName = 'unix'
|
||||
ifTrue: [OSProcess command: 'pandoc --standalone ', self markdownFile fullName, ' -o ', htmlFile].
|
||||
ifTrue: [
|
||||
OSSUnixSubprocess new
|
||||
command: 'pandoc';
|
||||
arguments: {'--standalone'. self markdownFile fullName. '--output' . htmlFile};
|
||||
redirectStdout;
|
||||
runAndWaitOnExitDo: [ :process :outString :errString |
|
||||
process isSuccess
|
||||
ifTrue: [ self inform: ('File exported as: ', String cr, htmlFile) ]
|
||||
ifFalse: [ self inform: 'Exportation unsuccesful. Please review that you have
|
||||
installed Pandoc and have used the exportation options properly.' ]]].
|
||||
Smalltalk platformName = 'Win32'
|
||||
ifTrue: [WindowsProcess command: 'pandoc --standalone ', self markdownFile fullName, ' -o ', htmlFile].
|
||||
self inform: ('File exported as: ', String cr, htmlFile).
|
||||
ifTrue: [WinProcess createProcess: 'pandoc --standalone ', self markdownFile fullName, ' -o ', htmlFile].
|
||||
]
|
||||
|
||||
{ #category : #persistence }
|
||||
|
Loading…
Reference in New Issue
Block a user