2022-04-05 21:39:07 +00:00
|
|
|
accessing
|
|
|
|
writeWordsFile
|
2022-04-15 01:27:26 +00:00
|
|
|
"TO DO: Debug Tweet words to work better with Urls"
|
2022-04-05 22:37:42 +00:00
|
|
|
| rawTweets rawWords collectionsWords count |
|
2022-04-14 22:40:41 +00:00
|
|
|
self messages ifNil: [ ^ self ].
|
2022-04-15 00:20:45 +00:00
|
|
|
rawTweets := self tweets messages.
|
2022-04-05 22:37:42 +00:00
|
|
|
|
|
|
|
rawWords := OrderedCollection new.
|
|
|
|
collectionsWords := ((rawTweets select:
|
2022-04-15 00:20:45 +00:00
|
|
|
[ :tweet | tweet authorId = self id ])
|
2022-04-05 22:37:42 +00:00
|
|
|
collect: [ :tweet | (tweet words
|
2022-04-15 01:27:26 +00:00
|
|
|
reject: [ :w |
|
|
|
|
w includesSubstring:
|
|
|
|
((self class nitterProvider asUrl host copyWithoutAll: '.'))]) ]).
|
2022-04-06 18:09:38 +00:00
|
|
|
collectionsWords do: [ :word | rawWords addAll: word ].
|
2022-04-05 22:37:42 +00:00
|
|
|
rawWords := ' ' join:rawWords.
|
|
|
|
|
2022-04-06 18:09:38 +00:00
|
|
|
^ MarkupFile exportAsFileOn: (self folder / 'words', 'txt') containing: rawWords.
|