2022-04-01 22:22:33 +00:00
|
|
|
accessing
|
2022-04-04 21:41:12 +00:00
|
|
|
exportWithTemplate: mustacheFile into: folder
|
2022-04-01 22:22:33 +00:00
|
|
|
|
2022-04-29 22:58:03 +00:00
|
|
|
| tempDictionary bioModified userModified nameModified |
|
2022-04-02 00:49:39 +00:00
|
|
|
tempDictionary := self asDictionary copy.
|
2022-06-01 20:52:32 +00:00
|
|
|
(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: '\#'.
|
|
|
|
bioModified := bioModified copyReplaceAll: '👑😎' with: ''.
|
|
|
|
bioModified := bioModified copyReplaceAll: '🇨🇴' with: ''.
|
|
|
|
bioModified := bioModified copyReplaceAll: '|' with: ''.
|
|
|
|
userModified := self asDictionary at: 'profile-card-username'.
|
|
|
|
userModified := userModified copyReplaceAll: '_' with: '\_'.
|
|
|
|
nameModified := self asDictionary at: 'profile-card-fullname'.
|
|
|
|
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)]
|
|
|
|
|