2022-04-15 00:20:45 +00:00
|
|
|
accessing
|
|
|
|
installExternalWordCloudCommons
|
|
|
|
|
|
|
|
| commonFiles folder |
|
|
|
|
commonFiles := #(
|
2022-04-15 00:39:46 +00:00
|
|
|
'https://mutabit.com/repos.fossil/mutabit/uv/wiki/commons/nube-mascara.jpg'
|
2022-04-15 01:00:06 +00:00
|
|
|
'https://mutabit.com/repos.fossil/mutabit/raw?name=wiki/commons/stopwords-es.txt&ci=tip').
|
2022-04-15 00:20:45 +00:00
|
|
|
folder := TweetsCollection dataStore / 'commons'.
|
2022-04-15 01:00:06 +00:00
|
|
|
folder exists
|
|
|
|
ifTrue: [ folder ensureDeleteAllChildren ]
|
|
|
|
ifFalse: [ folder ensureCreateDirectory].
|
2022-04-15 00:20:45 +00:00
|
|
|
commonFiles do: [ :fileUrl |
|
|
|
|
ZnClient new
|
|
|
|
url: fileUrl;
|
2022-04-15 00:39:46 +00:00
|
|
|
downloadTo: folder].
|
2022-04-15 01:00:06 +00:00
|
|
|
(folder children detect: [ :file | file basename includesSubstring: 'raw' ])
|
2022-04-16 06:59:52 +00:00
|
|
|
renameTo: (((commonFiles second splitOn: 'raw?') second splitOn: '/') last removeSuffix: '&ci=tip').
|
|
|
|
^ folder
|
2022-04-15 00:20:45 +00:00
|
|
|
|