Debugging file serialization.

This commit is contained in:
Diego Ruidajo 2022-01-26 18:12:50 -05:00
parent 64eba5a69f
commit b894b4b801

View File

@ -145,9 +145,11 @@ Tiddler >> exportJSONFile [
{ #category : #accessing } { #category : #accessing }
Tiddler >> exportSTONFile [ Tiddler >> exportSTONFile [
| stonFile output dashedTitle | | stonFile output dashedTitle sanitized date |
dashedTitle := '-' join: (self title substrings collect: [ :each | each ]). dashedTitle := '-' join: (self title substrings collect: [ :each | each ]).
stonFile := self wiki file parent / 'tiddlers' / (dashedTitle, '.', self created asString, '.ston'). sanitized := dashedTitle copyWithoutAll: #($¿ $? $! $/).
date := self created hash hex copyFrom: 1 to: 5.
stonFile := self wiki file parent / 'tiddlers' / (sanitized, '--', date, '.ston').
^ MarkupFile exportAsFileOn: stonFile containing: self asStonStringPretty ^ MarkupFile exportAsFileOn: stonFile containing: self asStonStringPretty
] ]