Now external word cloud installs its common files and loads required data.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-15 14:35:11 -05:00
parent 986f4a83bc
commit 2de7cf1d11
4 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,4 @@
accessing
areCommonFilesInstalled
"Returns true if common files are in the proper location, and false elsewhere."
^ ((TweetsCollection dataStore / 'commons') children collect: [ :file | file basename ] ) includesAll: self class commonFiles keys

View File

@ -2,6 +2,8 @@ accessing
externalWordCloud externalWordCloud
| text outputFile | | text outputFile |
self areCommonFilesInstalled
ifFalse: [ self installExternalWordCloudCommons ].
self writeWordsFile. self writeWordsFile.
outputFile := (self folder / 'nube.png') fullName. outputFile := (self folder / 'nube.png') fullName.
text := (self folder / 'words', 'txt') fullName. text := (self folder / 'words', 'txt') fullName.

View File

@ -1,6 +1,6 @@
accessing accessing
tweets tweets
self messages ifNil: [ ^ nil ]. self messages messages ifEmpty: [ self getMessages ].
^ TweetsCollection new ^ TweetsCollection new
messages: (self messages messages select: [ :each | each authorId = self id ]); messages: (self messages messages select: [ :each | each authorId = self id ]);
yourself yourself

View File

@ -0,0 +1,6 @@
accessing
commonFiles
"Files used by all profiles in data visualization and other tasks."
^ {'stopwords-es.txt' -> 'https://mutabit.com/repos.fossil/mutabit/raw?name=wiki/commons/stopwords-es.txt&ci=tip'.
'nube-mascara.jpg' -> 'https://mutabit.com/repos.fossil/mutabit/uv/wiki/commons/nube-mascara.jpg'
} asDictionary