From 7802cfe8f5e36f1321622229139622ba646f3bf6 Mon Sep 17 00:00:00 2001 From: ruidajo Date: Tue, 8 Mar 2022 18:41:54 -0500 Subject: [PATCH] Improving rebuilded tiddlers JSON. --- repository/TiddlyWiki/Tiddler.class.st | 5 ++--- repository/TiddlyWiki/TiddlyWiki.class.st | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/repository/TiddlyWiki/Tiddler.class.st b/repository/TiddlyWiki/Tiddler.class.st index afdf1b7..2d29439 100644 --- a/repository/TiddlyWiki/Tiddler.class.st +++ b/repository/TiddlyWiki/Tiddler.class.st @@ -152,11 +152,10 @@ Tiddler >> exportSTONFile [ { #category : #accessing } Tiddler >> exportSTONFileInto: subfolder [ - | stonFile output dashedTitle sanitized date | + | stonFile output dashedTitle sanitized | dashedTitle := '-' join: (self title substrings collect: [ :each | each ]). sanitized := dashedTitle copyWithoutAll: #($¿ $? $! $¡ $/). - date := self uid. - stonFile := self wiki file parent / subfolder / (sanitized, '--', date, '.ston'). + stonFile := self wiki file parent / subfolder / (sanitized, '--', self uid, '.ston'). ^ MarkupFile exportAsFileOn: stonFile containing: self asStonStringPretty ] diff --git a/repository/TiddlyWiki/TiddlyWiki.class.st b/repository/TiddlyWiki/TiddlyWiki.class.st index 992f4f0..60c3328 100644 --- a/repository/TiddlyWiki/TiddlyWiki.class.st +++ b/repository/TiddlyWiki/TiddlyWiki.class.st @@ -427,7 +427,6 @@ TiddlyWiki >> rebuildTiddlers [ addAll: (((self largeTiddlersFolder files) reject: [ :each | each basename beginsWith: '_shadow.ston' ]) collect: [ :each | STONJSON fromString: each contents ]); - addAll: (STON fromString:shadowTiddlersFile first contents); addAll: (contentTiddlersFiles collect:[ :each | STONJSON fromString: each contents ]). ^ stonTiddlers ] @@ -483,11 +482,12 @@ TiddlyWiki >> resynchronize [ | repository | self - exportJSONFileOptimized; + exportJSONFile; importJSONFile. repository := self repository. repository update. self exportContentTiddlers. + self exportLargeTiddlers. repository addRecentChangesFromWiki: self. ^ Dictionary new at: 'status' put: repository status;