Fixing messages processing for asDictionary and web report exporter.
This commit is contained in:
parent
625e66f006
commit
3148f61eb9
@ -3,4 +3,4 @@ profileImageUrl
|
|||||||
|
|
||||||
| documentTree |
|
| documentTree |
|
||||||
documentTree := [ self documentTree ] onErrorDo: [ ^ nil ].
|
documentTree := [ self documentTree ] onErrorDo: [ ^ nil ].
|
||||||
^ self class nitterProvider, (((documentTree xpath: '//div[@class="profile-card-info"]//a[@class="profile-card-avatar"]') @ 'href') stringValue copyReplaceAll: '%2F' with: '/') copyWithoutFirst
|
^ profileImageUrl := self class nitterProvider, (((documentTree xpath: '//div[@class="profile-card-info"]//a[@class="profile-card-avatar"]') @ 'href') stringValue copyReplaceAll: '%2F' with: '/') copyWithoutFirst
|
@ -2,6 +2,10 @@ accessing
|
|||||||
quotesReportData
|
quotesReportData
|
||||||
|
|
||||||
| tempDict labels xAxis |
|
| tempDict labels xAxis |
|
||||||
|
self quotes isEmpty
|
||||||
|
ifTrue: [ ^ { OrderedDictionary new.
|
||||||
|
('[''', '0', ''']').
|
||||||
|
('[''', 'No replies', ''']')} ].
|
||||||
tempDict := self quotes asMessagesUserNamesSortedByOccurrences.
|
tempDict := self quotes asMessagesUserNamesSortedByOccurrences.
|
||||||
|
|
||||||
tempDict size > 10 ifTrue: [
|
tempDict size > 10 ifTrue: [
|
||||||
|
@ -2,6 +2,10 @@ accessing
|
|||||||
repliesByWeeksTimeSpan
|
repliesByWeeksTimeSpan
|
||||||
|
|
||||||
| tweetsByTimeSpan xAxis labels |
|
| tweetsByTimeSpan xAxis labels |
|
||||||
|
self replies isEmpty
|
||||||
|
ifTrue: [ ^ { OrderedDictionary new.
|
||||||
|
('[''', '0', ''']').
|
||||||
|
('[''', 'No replies', ''']')} ].
|
||||||
tweetsByTimeSpan := self collectMessages: [ self replies ] byTimeSpanSplits: self tweetsDivisionsByWeeks.
|
tweetsByTimeSpan := self collectMessages: [ self replies ] byTimeSpanSplits: self tweetsDivisionsByWeeks.
|
||||||
xAxis := OrderedCollection new.
|
xAxis := OrderedCollection new.
|
||||||
(tweetsByTimeSpan values collect: [ :collection | collection size ]) do: [ :number |
|
(tweetsByTimeSpan values collect: [ :collection | collection size ]) do: [ :number |
|
||||||
|
@ -5,6 +5,8 @@ tweetsDivisionsByWeeks
|
|||||||
weeks := ((self newestTweet created - self oldestTweet created) days / 7).
|
weeks := ((self newestTweet created - self oldestTweet created) days / 7).
|
||||||
floor := weeks floor.
|
floor := weeks floor.
|
||||||
(weeks - floor) > 0.4
|
(weeks - floor) > 0.4
|
||||||
ifTrue: [ divisions := floor ]
|
ifTrue: [ floor = 0
|
||||||
|
ifTrue: [ divisions := 1 ]
|
||||||
|
ifFalse: [ divisions := floor]]
|
||||||
ifFalse: [ divisions := floor + 1 ].
|
ifFalse: [ divisions := floor + 1 ].
|
||||||
^ divisions
|
^ divisions
|
Loading…
Reference in New Issue
Block a user