Implemeting Nim optimizer installer.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-03-18 18:16:55 -05:00
parent 1b12ed67b0
commit 417ec17d3c

View File

@ -144,7 +144,7 @@ Tiddler >> deleteUid [
{ #category : #accessing } { #category : #accessing }
Tiddler >> exportJSONFile [ Tiddler >> exportJSONFile [
| jsonFile | | jsonFile |
jsonFile := self wiki file parent / 'tiddlers' / (self title asDashedLowercase,'.', self created asString, '.json'). jsonFile := self wiki folder / 'tiddlers' / (self title asDashedLowercase,'.', self created asString, '.json').
^ MarkupFile exportAsFileOn: jsonFile containing:self asJson ^ MarkupFile exportAsFileOn: jsonFile containing:self asJson
] ]
@ -250,6 +250,24 @@ Tiddler >> importFedWikiPage: pageViewUrlString [
{ #category : #accessing } { #category : #accessing }
Tiddler >> installTiddlerExporter [ Tiddler >> installTiddlerExporter [
| folder |
folder := (self wiki folder / 'scripts') ensureCreateDirectory.
ZnClient new
url: 'https://mutabit.com/repos.fossil/mutabit/uv/wiki/scripts/stringAsFileInto';
downloadTo: folder / 'exportJsonFile'.
ZnClient new
url: 'https://mutabit.com/repos.fossil/mutabit/doc/trunk/wiki/scripts/stringAsFileInto.nim';
downloadTo: folder / 'stringAsFileInto.nim'.
OSSUnixSubprocess new
command: 'chmod';
arguments: { '+x' . (folder / 'stringAsFileInto') fullName };
workingDirectory: folder fullName;
redirectStdout;
redirectStderr;
runAndWaitOnExitDo: [ :process :outString | ^ outString ]
] ]
{ #category : #testing } { #category : #testing }