diff --git a/repository/BaselineOfTiddlyWikiPharo/BaselineOfTiddlyWikiPharo.class.st b/repository/BaselineOfTiddlyWikiPharo/BaselineOfTiddlyWikiPharo.class.st index 6213bbd..78abf6a 100644 --- a/repository/BaselineOfTiddlyWikiPharo/BaselineOfTiddlyWikiPharo.class.st +++ b/repository/BaselineOfTiddlyWikiPharo/BaselineOfTiddlyWikiPharo.class.st @@ -9,7 +9,11 @@ BaselineOfTiddlyWikiPharo >> baseline: spec [ spec for: #common - do: [ + do: [ + "Dependencies" + spec baseline: 'ZTimestamp' with: [ spec repository: 'github://svenvc/ztimestamp/repository' ]. + + "Packages" spec package: 'TiddlyWikiPharo' ] ] diff --git a/repository/TiddlyWiki/Tiddler.class.st b/repository/TiddlyWiki/Tiddler.class.st index a182fab..3b79573 100644 --- a/repository/TiddlyWiki/Tiddler.class.st +++ b/repository/TiddlyWiki/Tiddler.class.st @@ -22,6 +22,12 @@ Class { #category : #'TiddlyWiki-Model' } +{ #category : #'instance creation' } +Tiddler class >> nowLocal [ + ^ (ZTimestampFormat fromString: '200102031605067') + format: (ZTimestamp fromString: Time nowLocal asDateAndTime asString) +] + { #category : #accessing } Tiddler >> asDictionary [ ^ Dictionary new @@ -29,6 +35,7 @@ Tiddler >> asDictionary [ at: 'text' put: self text; at: 'created' put: self created asString; at: 'tags' put: self tags; + at: 'type' put: self type; yourself. ] @@ -37,6 +44,12 @@ Tiddler >> asJson [ ^ STONJSON toStringPretty: self asDictionary ] +{ #category : #accessing } +Tiddler >> asJsonTempFile [ + ^ MarkupFile exportAsFileOn: FileLocator temp / self title, 'json' containing:self asJson + +] + { #category : #accessing } Tiddler >> caption [