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,20 +3,27 @@ exportWithTemplate: mustacheFile into: folder
|
|||||||
|
|
||||||
| tempDictionary bioModified userModified nameModified |
|
| tempDictionary bioModified userModified nameModified |
|
||||||
tempDictionary := self asDictionary copy.
|
tempDictionary := self asDictionary copy.
|
||||||
bioModified := self asDictionary at: 'profile-bio'.
|
(mustacheFile fullName endsWith: '.html')
|
||||||
bioModified := bioModified copyReplaceAll: '@' with: '\@'.
|
ifTrue: [ ^ MarkupFile
|
||||||
bioModified := bioModified copyReplaceAll: '_' with: '\_'.
|
exportAsFileOn: (folder / self userName , 'html')
|
||||||
bioModified := bioModified copyReplaceAll: '#' with: '\#'.
|
containing:(mustacheFile asMustacheTemplate value: tempDictionary)].
|
||||||
bioModified := bioModified copyReplaceAll: '👑😎' with: ''.
|
|
||||||
bioModified := bioModified copyReplaceAll: '🇨🇴' with: ''.
|
(mustacheFile fullName endsWith: '.tex')
|
||||||
bioModified := bioModified copyReplaceAll: '|' with: ''.
|
ifTrue: [ bioModified := self asDictionary at: 'profile-bio'.
|
||||||
userModified := self asDictionary at: 'profile-card-username'.
|
bioModified := bioModified copyReplaceAll: '@' with: '\@'.
|
||||||
userModified := userModified copyReplaceAll: '_' with: '\_'.
|
bioModified := bioModified copyReplaceAll: '_' with: '\_'.
|
||||||
nameModified := self asDictionary at: 'profile-card-fullname'.
|
bioModified := bioModified copyReplaceAll: '#' with: '\#'.
|
||||||
nameModified := nameModified copyReplaceAll: '🇨🇴' with: ''.
|
bioModified := bioModified copyReplaceAll: '👑😎' with: ''.
|
||||||
tempDictionary at: 'profile-bio' put: bioModified;
|
bioModified := bioModified copyReplaceAll: '🇨🇴' with: ''.
|
||||||
at: 'profile-card-username' put: userModified;
|
bioModified := bioModified copyReplaceAll: '|' with: ''.
|
||||||
at: 'profile-card-fullname' put: nameModified.
|
userModified := self asDictionary at: 'profile-card-username'.
|
||||||
^ MarkupFile
|
userModified := userModified copyReplaceAll: '_' with: '\_'.
|
||||||
exportAsFileOn: (folder / self userName , 'tex')
|
nameModified := self asDictionary at: 'profile-card-fullname'.
|
||||||
containing:(mustacheFile asMustacheTemplate value: tempDictionary)
|
nameModified := nameModified copyReplaceAll: '🇨🇴' with: ''.
|
||||||
|
tempDictionary at: 'profile-bio' put: bioModified;
|
||||||
|
at: 'profile-card-username' put: userModified;
|
||||||
|
at: 'profile-card-fullname' put: nameModified.
|
||||||
|
^ MarkupFile
|
||||||
|
exportAsFileOn: (folder / self userName , 'tex')
|
||||||
|
containing:(mustacheFile asMustacheTemplate value: tempDictionary)]
|
||||||
|
|
@ -3,7 +3,9 @@ installTemplate
|
|||||||
|
|
||||||
| templateFiles folder |
|
| templateFiles folder |
|
||||||
templateFiles := #(
|
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 := TweetsCollection dataStore / 'templates'.
|
||||||
folder exists
|
folder exists
|
||||||
ifTrue: [ folder ensureDeleteAllChildren ]
|
ifTrue: [ folder ensureDeleteAllChildren ]
|
||||||
|
Loading…
Reference in New Issue
Block a user