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 @@
fcn readConfigFile(config){ //--> read only dictionary
conf:=Dictionary();
foreach line in (config){
line=line.strip();
if (not line or "#"==line[0] or ";"==line[0]) continue;
line=line.replace("\t"," ");
n:=line.find(" ");
if (Void==n) conf[line.toLower()]=True; // eg NEEDSPEELING
else{
key:=line[0,n].toLower(); line=line[n,*];
n=line.find(",");
if (Void!=n) conf[key]=line.split(",").apply("strip").filter();
else conf[key]=line;
}
}
conf.makeReadOnly();
}
conf:=readConfigFile(File("foo.conf"));

View file

@ -0,0 +1,2 @@
foreach k,v in (conf){ println(k," : ",v) }
println("Value of seedsremoved = ",conf.find("seedsremoved",False));

View file

@ -0,0 +1,4 @@
var needspeeling,otherfamily,favouritefruit,fullname,seedsremoved;
foreach k,v in (conf){ try{ setVar(k,v) }catch{} };
foreach k,v in (vars){ println(k," : ",v) }
println("Value of seedsremoved = ",seedsremoved);