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