Debugging tiddlers importation from TiddlyHost.
This commit is contained in:
parent
b4b04967cc
commit
d04db00cb5
@ -428,12 +428,12 @@ TiddlyWiki >> importJSONFile [
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> importJSONLink [
|
||||
|
||||
| tiddlersJson |
|
||||
tiddlersJson := (self remote asString, '/tiddlers.json') asUrl retrieveContents.
|
||||
jsonFile := self folder / 'tiddlers.json'.
|
||||
self name; file.
|
||||
MarkupFile exportAsFileOn: jsonFile containing: tiddlersJson.
|
||||
^ self fromString: tiddlersJson
|
||||
self
|
||||
name;
|
||||
file.
|
||||
MarkupFile exportAsFileOn: jsonFile containing: self remoteTiddlersContentsString.
|
||||
^ self fromString: self remoteTiddlersContentsString
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
@ -675,6 +675,12 @@ TiddlyWiki >> remote: aUrlString [
|
||||
remote := aUrlString asZnUrl
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> remoteTiddlersContentsString [
|
||||
self isInTiddlyHost ifFalse: [ ^ self ].
|
||||
^ (self remote asString, '/tiddlers.json') asZnUrl retrieveContents.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> repository [
|
||||
|
||||
@ -761,7 +767,8 @@ TiddlyWiki >> taggedWith: aTag [
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> tiddlers [
|
||||
(self isInTiddlyHost and: [ tiddlers isNil ]) ifTrue: [ ^ self importJSONLink].
|
||||
tiddlers ifNotNil: [ ^ tiddlers ].
|
||||
self isInTiddlyHost ifTrue: [ ^ self importJSONLink].
|
||||
^ tiddlers ifNil: [ tiddlers := OrderedCollection new ]
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user