16 lines
550 B
Smalltalk
16 lines
550 B
Smalltalk
accessing
|
|
writeWordsFile
|
|
|
|
| rawTweets rawWords collectionsWords count |
|
|
self messages ifNil: [ ^ self ].
|
|
rawTweets := self tweets messages.
|
|
|
|
rawWords := OrderedCollection new.
|
|
collectionsWords := ((rawTweets select:
|
|
[ :tweet | tweet authorId = self id ])
|
|
collect: [ :tweet | (tweet words
|
|
reject: [ :w | w includesSubstring: self class nitterProvider ]) ]).
|
|
collectionsWords do: [ :word | rawWords addAll: word ].
|
|
rawWords := ' ' join:rawWords.
|
|
|
|
^ MarkupFile exportAsFileOn: (self folder / 'words', 'txt') containing: rawWords. |