diff --git a/Socialmetrica.package/NitterUser.class/instance/exportOverviewReportLatex.st b/Socialmetrica.package/NitterUser.class/instance/exportOverviewReportLatex.st index 8ff00d2..cd211d8 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportOverviewReportLatex.st +++ b/Socialmetrica.package/NitterUser.class/instance/exportOverviewReportLatex.st @@ -4,7 +4,7 @@ exportOverviewReportLatex self exportDefaultReport; externalWordCloud; - exportTweetsHistogramWithBars: 7 between: 'March 13 2022' and: 'May 1 2022'; + exportTweetsHistogramWithBars: 7; exportRetweetsHistogramWithBars: 7; exportRepliesHistogramWithBars: 7; exportQuotesHistogramWithBars: 7. diff --git a/Socialmetrica.package/NitterUser.class/instance/exportTweetsHistogramWithBars.between.and..st b/Socialmetrica.package/NitterUser.class/instance/exportTweetsHistogramWithBars.between.and..st deleted file mode 100644 index 686acba..0000000 --- a/Socialmetrica.package/NitterUser.class/instance/exportTweetsHistogramWithBars.between.and..st +++ /dev/null @@ -1,34 +0,0 @@ -accessing -exportTweetsHistogramWithBars: aNumberOfBars between: startDate and: endDate - - | tweetsByTimeSpan subtotals tweetsHistogram diagram | - - tweetsByTimeSpan := self collectMessages: [ self tweetsBetween: startDate and: endDate ] byTimeSpanSplits: aNumberOfBars. - subtotals := tweetsByTimeSpan values collect: [ :collection | collection size ]. - tweetsHistogram := RSChart new. - tweetsHistogram extent: 800@200. - diagram := RSBarPlot new - x: (1 to: subtotals size) - y:subtotals. - diagram color: (Color r:(91/255) g:(131/255) b:(222/255)). - tweetsHistogram addPlot: diagram. - tweetsHistogram addDecoration: (RSHorizontalTick new - fromNames: tweetsByTimeSpan keys; - labelRotation: 0; - fontSize: 72 /aNumberOfBars; - yourself). - tweetsHistogram addDecoration: (RSVerticalTick new - integer; - fontSize: 72 /aNumberOfBars). - tweetsHistogram build. - tweetsHistogram canvas pngExporter - zoomToShapes; - noFixedShapes; - fileName: (self folder / 'tweets-histogram.png')fullName; - export. - tweetsHistogram canvas pdfExporter - zoomToShapes; - noFixedShapes; - fileName: (self folder / 'tweets-histogram.pdf')fullName; - export. - ^ self folder / 'tweets-histogram.png' \ No newline at end of file diff --git a/Socialmetrica.package/NitterUser.class/instance/reportingPeriod.st b/Socialmetrica.package/NitterUser.class/instance/reportingPeriod.st new file mode 100644 index 0000000..8779999 --- /dev/null +++ b/Socialmetrica.package/NitterUser.class/instance/reportingPeriod.st @@ -0,0 +1,5 @@ +accessing +reportingPeriod + ^ self config + at: 'reportingPeriod' + ifAbsentPut: [ { self messages oldest created . self messages newest created } ] \ No newline at end of file diff --git a/Socialmetrica.package/NitterUser.class/instance/tweetsBetween.and..st b/Socialmetrica.package/NitterUser.class/instance/tweetsBetween.and..st deleted file mode 100644 index 066cf8d..0000000 --- a/Socialmetrica.package/NitterUser.class/instance/tweetsBetween.and..st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -tweetsBetween: startDate and: endDate - ^ self tweets select: [ :each | each created between: startDate asDate and: endDate asDate ] \ No newline at end of file diff --git a/Socialmetrica.package/TwitterUser.class/instance/messages.st b/Socialmetrica.package/TwitterUser.class/instance/messages.st index 45b9f6d..8bb406d 100644 --- a/Socialmetrica.package/TwitterUser.class/instance/messages.st +++ b/Socialmetrica.package/TwitterUser.class/instance/messages.st @@ -1,3 +1,4 @@ accessing messages - ^ messages ifNil: [ messages := TweetsCollection new ] \ No newline at end of file + messages ifNil: [ ^ messages := TweetsCollection new ]. + ^ messages select: [ :message | message created between: self reportingPeriod start and: self reportingPeriod end ] \ No newline at end of file diff --git a/Socialmetrica.package/TwitterUser.class/instance/reportingPeriod.st b/Socialmetrica.package/TwitterUser.class/instance/reportingPeriod.st new file mode 100644 index 0000000..9fa3308 --- /dev/null +++ b/Socialmetrica.package/TwitterUser.class/instance/reportingPeriod.st @@ -0,0 +1,3 @@ +accessing +reportingPeriod + ^ self subclassResponsibility \ No newline at end of file