Improving required folders detection for exporting visualizations.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-06-09 20:05:03 -05:00
parent fb00701e9e
commit d4432bae7a
4 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,6 @@
accessing accessing
exportDefaultReport exportDefaultReport
self hasTemplates (self hasFolder: 'templates')
ifFalse: [ self installTemplate ]. ifFalse: [ self installTemplate ].
^ self exportWithTemplate: (TweetsCollection dataStore / 'templates' / 'template.mus.tex') into: self folder ^ self exportWithTemplate: (TweetsCollection dataStore / 'templates' / 'template.mus.tex') into: self folder

View File

@ -1,6 +1,8 @@
accessing accessing
exportStaticWebReport exportStaticWebReport
self hasTemplates (self hasFolder: 'commons')
ifFalse: [ self installCommons ].
(self hasFolder: 'templates')
ifFalse: [ self installTemplate ]. ifFalse: [ self installTemplate ].
^ self exportWithTemplate: (TweetsCollection dataStore / 'templates' / 'index.mus.html') into: self folder ^ self exportWithTemplate: (TweetsCollection dataStore / 'templates' / 'index.mus.html') into: self folder

View File

@ -0,0 +1,6 @@
accessing
hasFolder: folderName
| fullFolderPath |
fullFolderPath :=(TweetsCollection dataStore / folderName ).
^ fullFolderPath exists and: [ fullFolderPath children isNotEmpty ]

View File

@ -1,6 +0,0 @@
accessing
hasTemplates
| templatesFolder |
templatesFolder :=(TweetsCollection dataStore / 'templates' ).
^ templatesFolder exists and: [ templatesFolder children isNotEmpty ]