Improving Tiddlers JSON export.
This commit is contained in:
parent
14ecfa16f7
commit
b62c642ccd
@ -7,6 +7,8 @@ OrderedDictionary >> asTiddler [
|
|||||||
tiddlerFields := response class slotNames copyWithoutAll: #('wiki' 'customFields').
|
tiddlerFields := response class slotNames copyWithoutAll: #('wiki' 'customFields').
|
||||||
self keysAndValuesDo: [ :key :value |
|
self keysAndValuesDo: [ :key :value |
|
||||||
(tiddlerFields includes: key)
|
(tiddlerFields includes: key)
|
||||||
|
ifFalse: [
|
||||||
|
response customFields at: key put: value ]
|
||||||
ifTrue: [ response writeSlotNamed: key value: value ]
|
ifTrue: [ response writeSlotNamed: key value: value ]
|
||||||
].
|
].
|
||||||
^ response
|
^ response
|
||||||
|
@ -57,7 +57,7 @@ TWSeed class >> initialize [
|
|||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
TWSeed class >> install: seedName into: folder as: shortName [
|
TWSeed class >> install: seedName into: folder as: shortName [
|
||||||
|
|
||||||
| file url seedFile subfolder wiki |
|
| file url seedFile subfolder |
|
||||||
seedFile := self selectSeed: seedName.
|
seedFile := self selectSeed: seedName.
|
||||||
subfolder := (folder / shortName) ensureCreateDirectory.
|
subfolder := (folder / shortName) ensureCreateDirectory.
|
||||||
file := subfolder / 'index.html'.
|
file := subfolder / 'index.html'.
|
||||||
@ -70,7 +70,7 @@ TWSeed class >> install: seedName into: folder as: shortName [
|
|||||||
].
|
].
|
||||||
url := seedFile demo.
|
url := seedFile demo.
|
||||||
url asUrl saveContentsToFile: file.
|
url asUrl saveContentsToFile: file.
|
||||||
^ wiki := TiddlyWiki new
|
^ TiddlyWiki new
|
||||||
file: file;
|
file: file;
|
||||||
name: shortName.
|
name: shortName.
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user