From 68333ff0c0aa47a887cd14a22f89e09188ff55d0 Mon Sep 17 00:00:00 2001 From: ruidajo Date: Thu, 9 Jun 2022 14:14:37 -0500 Subject: [PATCH] Creating templates testing and Modifying exporters --- .../NitterUser.class/instance/exportDefaultReport.st | 3 ++- .../NitterUser.class/instance/exportStaticWebReport.st | 3 ++- .../NitterUser.class/instance/hasTemplates.st | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 Socialmetrica.package/NitterUser.class/instance/hasTemplates.st diff --git a/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st b/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st index 8ad0c59..a0df503 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st +++ b/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st @@ -1,5 +1,6 @@ accessing exportDefaultReport - self installTemplate. + self hasTemplates + ifFalse: [ 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/exportStaticWebReport.st b/Socialmetrica.package/NitterUser.class/instance/exportStaticWebReport.st index bc11782..a0cd0ee 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportStaticWebReport.st +++ b/Socialmetrica.package/NitterUser.class/instance/exportStaticWebReport.st @@ -1,5 +1,6 @@ accessing exportStaticWebReport - self installTemplate. + self hasTemplates + ifTrue: [ self installTemplate ]. ^ self exportWithTemplate: (TweetsCollection dataStore / 'templates' / 'index.mus.html') into: self folder \ No newline at end of file diff --git a/Socialmetrica.package/NitterUser.class/instance/hasTemplates.st b/Socialmetrica.package/NitterUser.class/instance/hasTemplates.st new file mode 100644 index 0000000..29be008 --- /dev/null +++ b/Socialmetrica.package/NitterUser.class/instance/hasTemplates.st @@ -0,0 +1,6 @@ +accessing +hasTemplates + + | templatesFolder | + templatesFolder :=(TweetsCollection dataStore / 'templates' ). + ^ templatesFolder exists and: [ templatesFolder children isNotEmpty ] \ No newline at end of file