Creating export as static web report.
This commit is contained in:
parent
5fdad7fa69
commit
3ad7148e62
@ -0,0 +1,5 @@
|
||||
accessing
|
||||
exportStaticWebReport
|
||||
|
||||
self installTemplate.
|
||||
^ self exportWithTemplate: (TweetsCollection dataStore / 'templates' / 'index.mus.html') into: self folder
|
@ -3,7 +3,13 @@ exportWithTemplate: mustacheFile into: folder
|
||||
|
||||
| tempDictionary bioModified userModified nameModified |
|
||||
tempDictionary := self asDictionary copy.
|
||||
bioModified := self asDictionary at: 'profile-bio'.
|
||||
(mustacheFile fullName endsWith: '.html')
|
||||
ifTrue: [ ^ MarkupFile
|
||||
exportAsFileOn: (folder / self userName , 'html')
|
||||
containing:(mustacheFile asMustacheTemplate value: tempDictionary)].
|
||||
|
||||
(mustacheFile fullName endsWith: '.tex')
|
||||
ifTrue: [ bioModified := self asDictionary at: 'profile-bio'.
|
||||
bioModified := bioModified copyReplaceAll: '@' with: '\@'.
|
||||
bioModified := bioModified copyReplaceAll: '_' with: '\_'.
|
||||
bioModified := bioModified copyReplaceAll: '#' with: '\#'.
|
||||
@ -19,4 +25,5 @@ exportWithTemplate: mustacheFile into: folder
|
||||
at: 'profile-card-fullname' put: nameModified.
|
||||
^ MarkupFile
|
||||
exportAsFileOn: (folder / self userName , 'tex')
|
||||
containing:(mustacheFile asMustacheTemplate value: tempDictionary)
|
||||
containing:(mustacheFile asMustacheTemplate value: tempDictionary)]
|
||||
|
@ -3,7 +3,9 @@ installTemplate
|
||||
|
||||
| templateFiles folder |
|
||||
templateFiles := #(
|
||||
'https://mutabit.com/repos.fossil/mutabit/raw?name=plantillas/TwentySecondsCV/twentysecondcvMod.cls&ci=tip' 'https://mutabit.com/repos.fossil/mutabit/raw?name=plantillas/TwentySecondsCV/template.mus.tex&ci=tip').
|
||||
'https://mutabit.com/repos.fossil/mutabit/raw?name=plantillas/TwentySecondsCV/twentysecondcvMod.cls&ci=tip'
|
||||
'https://mutabit.com/repos.fossil/mutabit/raw?name=plantillas/TwentySecondsCV/template.mus.tex&ci=tip'
|
||||
'https://mutabit.com/repos.fossil/mutabit/raw?name=plantillas/SarissaPersonalBlog/index.mus.html&ci=tip').
|
||||
folder := TweetsCollection dataStore / 'templates'.
|
||||
folder exists
|
||||
ifTrue: [ folder ensureDeleteAllChildren ]
|
||||
|
Loading…
Reference in New Issue
Block a user