Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,19 @@
dict := Dictionary new.
configFile asFilename readingLinesDo:[:line |
(line isEmpty or:[ line startsWithAnyOf:#('#' ';') ]) ifFalse:[
s := line readStream.
(s skipSeparators; atEnd) ifFalse:[
|optionName values|
optionName := s upToSeparator.
values := (s upToEnd asCollectionOfSubstringsSeparatedBy:$,)
collect:[:each | each withoutSeparators]
thenSelect:[:vals | vals notEmpty].
dict at:optionName asLowercase put:(values isEmpty
ifTrue:[true]
ifFalse:[
values size == 1
ifTrue:[values first]
ifFalse:[values]]).
]
].
]

View file

@ -0,0 +1,5 @@
dict keysAndValuesDo:[:eachOption :eachValue |
someObject
perform:(eachOption,':') asSymbol with:eachValue
ifNotUnderstood: [ self error: 'unknown option: ', eachOption ]
]

View file

@ -0,0 +1,5 @@
fullname := dict at: 'fullname' ifAbsent:false.
needspeeling := dict at: 'needspeeling' ifAbsent:false.
favouritefruit := dict at: 'favouritefruit' ifAbsent:false.
otherfamily := dict at: 'otherfamily' ifAbsent:false.
seedsremoved := dict at: 'seedsremoved' ifAbsent:false.