Local and remote tiddlers UID integration.
This commit is contained in:
parent
8bea95118d
commit
110b5460dd
@ -242,7 +242,7 @@ TiddlyWiki >> exportJSONFromRebuildedCommonTiddlers [
|
||||
| rebuildedTiddlersJSON dateNowString wikiFolder|
|
||||
wikiFolder := self folder.
|
||||
dateNowString := (DateAndTime now asLocalStringYMDHM copyReplaceAll: ':' with: '-') copyReplaceAll: ' ' with: '-'.
|
||||
rebuildedTiddlersJSON := '[', (',' join: (self rebuildTiddlersWithoutLargeTiddlers collect: [ :each | each asJsonString ])), ']'.
|
||||
rebuildedTiddlersJSON := '[', (',' join: (self rebuildWithoutLargeTiddlers collect: [ :each | each asJsonString ])), ']'.
|
||||
^ MarkupFile exportAsFileOn: wikiFolder / 'rebuildedCommonTiddlers', dateNowString, 'json' containing: rebuildedTiddlersJSON
|
||||
|
||||
]
|
||||
@ -365,7 +365,15 @@ TiddlyWiki >> fromUrl: anUrlString [
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> getRemoteTiddlers [
|
||||
self importJSONLink.
|
||||
| remoteTiddlers localTiddlers |
|
||||
remoteTiddlers := self importJSONLink tiddlers.
|
||||
localTiddlers := self rebuildWithoutLargeTiddlers asArray.
|
||||
"^ self recentCommonTiddlersChanged"
|
||||
localTiddlers do: [ :each | | remoteTiddler |
|
||||
remoteTiddler := remoteTiddlers detect: [:tiddler | tiddler title = each title].
|
||||
remoteTiddler customFields at: 'uid' put: (each customFields at: 'uid').
|
||||
].
|
||||
self tiddlers: remoteTiddlers.
|
||||
^ self recentCommonTiddlersChanged
|
||||
]
|
||||
|
||||
@ -555,7 +563,7 @@ TiddlyWiki >> rebuildTiddlers [
|
||||
|
||||
stonTiddlers := OrderedCollection new.
|
||||
stonTiddlers
|
||||
addAll: self rebuildTiddlersWithoutShadows ;
|
||||
addAll: self rebuildWithoutShadows ;
|
||||
addAll: (STON fromString:shadowTiddlersFile first contents).
|
||||
^ stonTiddlers
|
||||
]
|
||||
@ -563,13 +571,13 @@ TiddlyWiki >> rebuildTiddlers [
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> rebuildTiddlersJSON [
|
||||
|
||||
self tiddlers: self rebuildTiddlersWithoutShadows.
|
||||
self tiddlers: self rebuildWithoutShadows.
|
||||
^ self exportJSONSubtiddlers:
|
||||
(self rebuildTiddlersWithoutShadows) as: 'rebuildedTiddlers'.
|
||||
(self rebuildWithoutShadows) as: 'rebuildedTiddlers'.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> rebuildTiddlersWithoutLargeTiddlers [
|
||||
TiddlyWiki >> rebuildWithoutLargeTiddlers [
|
||||
|
||||
| stonTiddlers contentTiddlersFiles |
|
||||
contentTiddlersFiles := self tiddlersFolder files
|
||||
@ -584,7 +592,7 @@ TiddlyWiki >> rebuildTiddlersWithoutLargeTiddlers [
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
TiddlyWiki >> rebuildTiddlersWithoutShadows [
|
||||
TiddlyWiki >> rebuildWithoutShadows [
|
||||
|
||||
| stonTiddlers largeTiddlersRebuild |
|
||||
largeTiddlersRebuild := (((self largeTiddlersFolder files)
|
||||
@ -594,7 +602,7 @@ TiddlyWiki >> rebuildTiddlersWithoutShadows [
|
||||
stonTiddlers := OrderedCollection new.
|
||||
stonTiddlers
|
||||
addAll: largeTiddlersRebuild;
|
||||
addAll: self rebuildTiddlersWithoutLargeTiddlers.
|
||||
addAll: self rebuildWithoutLargeTiddlers.
|
||||
^ stonTiddlers
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user