Implementing YAML metadata to JSON via external Nim script.
This commit is contained in:
parent
94b3c59d7a
commit
2bb50789ea
@ -22,7 +22,7 @@ MiniDocs class >> installYamlToJson [
|
||||
command: 'nim';
|
||||
arguments: {'c'. self yamlToJsonSourceCode fullName};
|
||||
runAndWaitOnExitDo: [ :process :outString |
|
||||
(self yamlToJsonSourceCode basenameWithoutExtension) moveTo: MiniDocs appFolder asFileReference.
|
||||
(self yamlToJsonSourceCode parent / self yamlToJsonSourceCode basenameWithoutExtension) moveTo: MiniDocs appFolder asFileReference.
|
||||
^ MiniDocs appFolder ]
|
||||
]
|
||||
|
||||
@ -33,7 +33,11 @@ MiniDocs class >> yamlToJson: yamlString [
|
||||
|
||||
OSSUnixSubprocess new
|
||||
command: self yamlToJsonBinary fullName;
|
||||
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
|
||||
arguments: {yamlString};
|
||||
redirectStdout;
|
||||
runAndWaitOnExitDo: [ :process :outString |
|
||||
^ (STONJSON fromString: outString allButFirst) first
|
||||
]
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
@ -43,5 +47,5 @@ MiniDocs class >> yamlToJsonBinary [
|
||||
|
||||
{ #category : #accessing }
|
||||
MiniDocs class >> yamlToJsonSourceCode [
|
||||
^ FileLocator image parent / 'pharo-local/iceberg/Offray/MiniDocs/src/yamlToJso.nim'
|
||||
^ FileLocator image parent / 'pharo-local/iceberg/Offray/MiniDocs/src/yamlToJson.nim'
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user