Improving oracles' import/export.
This commit is contained in:
parent
9f8556bfa3
commit
f5edec4708
@ -3,5 +3,5 @@ asTiddler
|
|||||||
^ Tiddler new
|
^ Tiddler new
|
||||||
title: self name;
|
title: self name;
|
||||||
tags: 'Starforged';
|
tags: 'Starforged';
|
||||||
text: self intro, String lf, String lf, self optionsWikiTextTable;
|
text: self introText, String cr, String cr, self optionsWikiTextTable;
|
||||||
created: DateAndTime now asString.
|
created: DateAndTime now asString.
|
@ -1,7 +1,7 @@
|
|||||||
accessing
|
accessing
|
||||||
fromDictionary: aDictionary
|
fromDictionary: aDictionary
|
||||||
| optionsTable |
|
| optionsTable |
|
||||||
name := aDictionary at: 'Name'.
|
name := aDictionary at: 'Name' ifAbsent: [ name := aDictionary at: 'Display name' ].
|
||||||
optionsTable := aDictionary at: 'Table'.
|
optionsTable := aDictionary at: 'Table'.
|
||||||
optionsTable doWithIndex: [:opt :i | | key value prevKey |
|
optionsTable doWithIndex: [:opt :i | | key value prevKey |
|
||||||
(i = 1)
|
(i = 1)
|
||||||
|
3
RoloLudo.package/SfOracle.class/instance/introText.st
Normal file
3
RoloLudo.package/SfOracle.class/instance/introText.st
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
accessing
|
||||||
|
introText
|
||||||
|
^ self intro ifNil: [ ^ '' ]
|
@ -2,9 +2,10 @@ accessing
|
|||||||
optionsWikiTextTable
|
optionsWikiTextTable
|
||||||
| output |
|
| output |
|
||||||
output := '' writeStream.
|
output := '' writeStream.
|
||||||
self options keysAndValuesDo: [:k :v |
|
self options keysAndValuesDo: [:k :v | | keyString |
|
||||||
|
keyString := ((k size = 1) ifTrue: [ k first asString ] ifFalse: [ k first asString, ' - ', k last asString ]).
|
||||||
output
|
output
|
||||||
nextPutAll: '| ', k first asString, ' - ', k last asString, ' |';
|
nextPutAll: '| ',keyString , ' |';
|
||||||
nextPutAll: v, ' |'; cr
|
nextPutAll: v, ' |'; cr
|
||||||
].
|
].
|
||||||
^ output contents
|
^ output contents
|
Loading…
Reference in New Issue
Block a user