This commit is contained in:
Offray Vladimir Luna Cárdenas 2021-08-09 21:07:04 -05:00
commit 5b7fe3406d
2 changed files with 18 additions and 1 deletions

View File

@ -9,7 +9,11 @@ BaselineOfTiddlyWikiPharo >> baseline: spec [
<baseline>
spec
for: #common
do: [
do: [
"Dependencies"
spec baseline: 'ZTimestamp' with: [ spec repository: 'github://svenvc/ztimestamp/repository' ].
"Packages"
spec package: 'TiddlyWikiPharo'
]
]

View File

@ -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 [