From fd50a127326fb90da2d29f760620a184a249c1b1 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sun, 28 Jul 2024 10:55:40 -0500 Subject: [PATCH] Implementing download of wikis embedding binary data (i.e. raster images) --- repository/TiddlyWiki/TiddlyWiki.class.st | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/repository/TiddlyWiki/TiddlyWiki.class.st b/repository/TiddlyWiki/TiddlyWiki.class.st index 3cc7ceb..43b7229 100644 --- a/repository/TiddlyWiki/TiddlyWiki.class.st +++ b/repository/TiddlyWiki/TiddlyWiki.class.st @@ -228,6 +228,10 @@ TiddlyWiki >> downloadHTML [ ^ self folder ] +{ #category : #accessing } +TiddlyWiki >> downloadJSONCache [ +] + { #category : #accessing } TiddlyWiki >> exportCommonTiddlers [ @@ -831,8 +835,11 @@ TiddlyWiki >> remote: aUrlString [ { #category : #accessing } TiddlyWiki >> remoteTiddlersContentsString [ + | jsonAddress | self isInTiddlyHost ifFalse: [ ^ self ]. - ^ (self remote asString, '/tiddlers.json') asZnUrl retrieveContents. + jsonAddress := self remote asString, '/tiddlers.json'. + ^ [jsonAddress asZnUrl retrieveContents] + onErrorDo: [ self downloadJSONCache ]. ] { #category : #accessing }