Replacing with GToolkit's OS process manager.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2024-10-23 10:37:43 -05:00
parent 4fab465883
commit b5f4602796

View File

@ -302,10 +302,11 @@ TiddlyWiki >> exportJSONFileOptimized [
exporter := wikiFolder / 'scripts' / 'exportJsonFile'.
exporter exists ifFalse: [ self installJsonExporter ].
OSSUnixSubprocess new
GtSubprocessWithInMemoryOutput new
command: exporter fullName;
workingDirectory: exporter parent fullName;
runAndWaitOnExitDo: [ :process :outString | ^ self jsonFile ]
runAndWait.
^ self jsonFile
]
{ #category : #accessing }
@ -540,22 +541,20 @@ TiddlyWiki >> importSTONFilesFrom: aFolder [
{ #category : #accessing }
TiddlyWiki >> installJsonExporter [
| folder |
folder := (self file parent / 'scripts') ensureCreateDirectory.
| subfolder |
subfolder := (self folder / 'scripts') ensureCreateDirectory.
ZnClient new
url: 'https://mutabit.com/repos.fossil/mutabit/uv/wiki/scripts/exportJsonFile';
downloadTo: folder / 'exportJsonFile'.
downloadTo: subfolder / 'exportJsonFile'.
ZnClient new
url: 'https://mutabit.com/repos.fossil/mutabit/doc/trunk/wiki/scripts/exportJsonFile.nim';
downloadTo: folder / 'exportJsonFile.nim'.
downloadTo: subfolder / 'exportJsonFile.nim'.
OSSUnixSubprocess new
command: 'chmod';
arguments: { '+x' . (folder / 'exportJsonFile') fullName };
workingDirectory: folder fullName;
redirectStdout;
redirectStderr;
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
^ GtSubprocessWithInMemoryOutput new
command: 'chmod +x ' , ((subfolder / 'exportJsonFile') fullName);
workingDirectory: subfolder fullName;
runAndWait;
stdout
]
{ #category : #accessing }