From bbfae14949d315904b4dc45d412b792b58adf702 Mon Sep 17 00:00:00 2001 From: ruidajo Date: Thu, 21 Apr 2022 12:11:53 -0500 Subject: [PATCH] Creating exporter for report in LaTeX format. --- .../NitterUser.class/instance/exportDefaultReport.st | 3 ++- .../instance/exportOverviewReportLatex.st | 11 +++++++++++ .../instance/exportProfileImageOn..st | 2 +- .../NitterUser.class/instance/externalWordCloud.st | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 Socialmetrica.package/NitterUser.class/instance/exportOverviewReportLatex.st diff --git a/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st b/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st index 6576a75..8ad0c59 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st +++ b/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st @@ -1,4 +1,5 @@ accessing exportDefaultReport - ^ self exportWithTemplate: TweetsCollection dataStore / 'templates' / 'template.mus.tex' into: self folder \ No newline at end of file + self installTemplate. + ^ self exportWithTemplate: (TweetsCollection dataStore / 'templates' / 'template.mus.tex') into: self folder \ No newline at end of file diff --git a/Socialmetrica.package/NitterUser.class/instance/exportOverviewReportLatex.st b/Socialmetrica.package/NitterUser.class/instance/exportOverviewReportLatex.st new file mode 100644 index 0000000..7b067ed --- /dev/null +++ b/Socialmetrica.package/NitterUser.class/instance/exportOverviewReportLatex.st @@ -0,0 +1,11 @@ +accessing +exportOverviewReportLatex + + self + exportDefaultReport; + externalWordCloud; + exportTweetsHistogramWithBars: 5; + exportRetweetsHistogramWithBars: 5; + exportRepliesHistogramWithBars: 5; + exportQuotesHistogramWithBars: 5. + ^ self folder \ No newline at end of file diff --git a/Socialmetrica.package/NitterUser.class/instance/exportProfileImageOn..st b/Socialmetrica.package/NitterUser.class/instance/exportProfileImageOn..st index 7e4c476..165a851 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportProfileImageOn..st +++ b/Socialmetrica.package/NitterUser.class/instance/exportProfileImageOn..st @@ -6,7 +6,7 @@ exportProfileImageOn: fileReference file exists ifFalse: [ file ensureCreateFile. file binaryWriteStreamDo: [ :stream | - stream nextPutAll: profileImageUrl retrieveContents ]. + stream nextPutAll: profileImageUrl asUrl retrieveContents ]. super class inform: 'Exported as: ', String cr, file fullName. ^ file] diff --git a/Socialmetrica.package/NitterUser.class/instance/externalWordCloud.st b/Socialmetrica.package/NitterUser.class/instance/externalWordCloud.st index 34d510c..3d4de6c 100644 --- a/Socialmetrica.package/NitterUser.class/instance/externalWordCloud.st +++ b/Socialmetrica.package/NitterUser.class/instance/externalWordCloud.st @@ -5,7 +5,7 @@ externalWordCloud self areCommonFilesInstalled ifFalse: [ self installExternalWordCloudCommons ]. self writeWordsFile. - outputFile := (self folder / 'nube.png') fullName. + outputFile := (self folder / 'wordcloud.png') fullName. text := (self folder / 'words', 'txt') fullName. OSSUnixSubprocess new command: 'wordcloud_cli';