From 417ec17d3c3bcb06fb99bdd344766bbd2e550b9f Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 18 Mar 2022 18:16:55 -0500 Subject: [PATCH] Implemeting Nim optimizer installer. --- repository/TiddlyWiki/Tiddler.class.st | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/repository/TiddlyWiki/Tiddler.class.st b/repository/TiddlyWiki/Tiddler.class.st index a10d39d..5cf9fab 100644 --- a/repository/TiddlyWiki/Tiddler.class.st +++ b/repository/TiddlyWiki/Tiddler.class.st @@ -144,7 +144,7 @@ Tiddler >> deleteUid [ { #category : #accessing } Tiddler >> exportJSONFile [ | 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 ] @@ -250,6 +250,24 @@ Tiddler >> importFedWikiPage: pageViewUrlString [ { #category : #accessing } 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 }