diff --git a/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st b/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st index a0df503..a250572 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st +++ b/Socialmetrica.package/NitterUser.class/instance/exportDefaultReport.st @@ -1,6 +1,6 @@ accessing exportDefaultReport - self hasTemplates + (self hasFolder: 'templates') 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 4400ad8..3338d0b 100644 --- a/Socialmetrica.package/NitterUser.class/instance/exportStaticWebReport.st +++ b/Socialmetrica.package/NitterUser.class/instance/exportStaticWebReport.st @@ -1,6 +1,8 @@ accessing exportStaticWebReport - self hasTemplates + (self hasFolder: 'commons') + ifFalse: [ self installCommons ]. + (self hasFolder: 'templates') ifFalse: [ 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/hasFolder..st b/Socialmetrica.package/NitterUser.class/instance/hasFolder..st new file mode 100644 index 0000000..528215c --- /dev/null +++ b/Socialmetrica.package/NitterUser.class/instance/hasFolder..st @@ -0,0 +1,6 @@ +accessing +hasFolder: folderName + + | fullFolderPath | + fullFolderPath :=(TweetsCollection dataStore / folderName ). + ^ fullFolderPath exists and: [ fullFolderPath children isNotEmpty ] \ No newline at end of file diff --git a/Socialmetrica.package/NitterUser.class/instance/hasTemplates.st b/Socialmetrica.package/NitterUser.class/instance/hasTemplates.st deleted file mode 100644 index 74cb554..0000000 --- a/Socialmetrica.package/NitterUser.class/instance/hasTemplates.st +++ /dev/null @@ -1,6 +0,0 @@ -accessing -hasTemplates - - | templatesFolder | - templatesFolder :=(TweetsCollection dataStore / 'templates' ). - ^ templatesFolder exists and: [ templatesFolder children isNotEmpty ] \ No newline at end of file