Fixing external word cloud commons installation.

This commit is contained in:
ruidajo 2022-04-14 20:00:06 -05:00
parent a50e37dce1
commit 216832c3e2

View File

@ -4,12 +4,16 @@ installExternalWordCloudCommons
| commonFiles folder |
commonFiles := #(
'https://mutabit.com/repos.fossil/mutabit/uv/wiki/commons/nube-mascara.jpg'
'https://mutabit.com/repos.fossil/mutabit/raw/cf2aa88169752092a0bd39f8e20128abc85ad5c47d9679496663570c4d30fff0?at=stopwords-es.txt').
'https://mutabit.com/repos.fossil/mutabit/raw?name=wiki/commons/stopwords-es.txt&ci=tip').
folder := TweetsCollection dataStore / 'commons'.
folder exists ifFalse: [ folder ensureCreateDirectory].
folder exists
ifTrue: [ folder ensureDeleteAllChildren ]
ifFalse: [ folder ensureCreateDirectory].
commonFiles do: [ :fileUrl |
ZnClient new
url: fileUrl;
downloadTo: folder].
(folder children detect: [ :file | file basename includesSubstring: 'raw' ])
renameTo: 'stopwords-es.txt'.
^ folder