diff --git a/repository/TiddlyWiki/Tiddler.class.st b/repository/TiddlyWiki/Tiddler.class.st index 5eec807..afdf1b7 100644 --- a/repository/TiddlyWiki/Tiddler.class.st +++ b/repository/TiddlyWiki/Tiddler.class.st @@ -155,7 +155,7 @@ Tiddler >> exportSTONFileInto: subfolder [ | stonFile output dashedTitle sanitized date | dashedTitle := '-' join: (self title substrings collect: [ :each | each ]). sanitized := dashedTitle copyWithoutAll: #($¿ $? $! $¡ $/). - date := self created hash hex copyFrom: 1 to: 5. + date := self uid. stonFile := self wiki file parent / subfolder / (sanitized, '--', date, '.ston'). ^ MarkupFile exportAsFileOn: stonFile containing: self asStonStringPretty ] @@ -457,6 +457,17 @@ Tiddler >> type: anObject [ type := anObject ] +{ #category : #accessing } +Tiddler >> uid [ + | tempId | + self created + ifNotNil: [ tempId := self created hash hex copyFrom: 1 to: 5. ] + ifNil: [ tempId := self class nowLocal hash hex copyFrom: 1 to: 5 ]. + self customFields at: 'uid' put: tempId . + ^ tempId + +] + { #category : #accessing } Tiddler >> wiki [ ^ wiki