From 941d04257031ab401ad8b558a753f36e6cab71f3 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 5 Nov 2021 08:21:59 -0500 Subject: [PATCH] Fixing config file management and starting with remote JSON url definitions. --- repository/TiddlyWiki/TiddlyWiki.class.st | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/repository/TiddlyWiki/TiddlyWiki.class.st b/repository/TiddlyWiki/TiddlyWiki.class.st index c5f14b8..56a2568 100644 --- a/repository/TiddlyWiki/TiddlyWiki.class.st +++ b/repository/TiddlyWiki/TiddlyWiki.class.st @@ -26,13 +26,13 @@ TiddlyWiki class >> fromJSONUrl: anUrlString [ { #category : #accessing } TiddlyWiki >> addToConfigFile [ - | cleaned | + | cleaned newConfig | cleaned := self copy. cleaned tiddlers: nil. - self configDictonary + newConfig := self configDictonary at: cleaned name put: cleaned; yourself. - MarkupFile exportAsFileOn: self configFile containing:(STON toStringPretty: self configDictonary) + ^ MarkupFile exportAsFileOn: self configFile containing:(STON toStringPretty: newConfig) ] { #category : #accessing } @@ -215,6 +215,11 @@ TiddlyWiki >> tiddlersJSONFile [ ^ jsonFile ] +{ #category : #accessing } +TiddlyWiki >> tiddlersJSONUrl [ + self remote ifNil: [^ nil]. +] + { #category : #accessing } TiddlyWiki >> withoutImages [ | filteredTiddlers tempWiki |