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,18 @@
function AbbreviationsAutomatic days
put 1 into abbreviationLength
put the number of items in days into len
repeat forever
put () into abbreviations
repeat with each item day in days
put the first abbreviationLength characters of day into abbreviation
if abbreviations contains abbreviation
exit repeat
end if
insert abbreviation after abbreviations
if the number of items in abbreviations is len
return abbreviationLength
end if
end repeat
add 1 to abbreviationLength
end repeat
end AbbreviationsAutomatic

View file

@ -0,0 +1,22 @@
put "Weekdays.txt" into myFile
put the defaultStringEncoding into savedEncoding
put "WinLatin1" into the defaultStringEncoding
open file myFile
repeat forever
read from file myFile until return
if it is empty then exit repeat
split trim(it) by " "
if the number of items in it is 0
put ""
else
put AbbreviationsAutomatic(it) && it
end if
end repeat
close file myFile
put savedEncoding into the defaultStringEncoding