Socialmetrica/Socialmetrica.package/NitterUser.class/instance/exportWithTemplate.into..st

13 lines
526 B
Smalltalk
Raw Normal View History

accessing
2022-04-04 21:41:12 +00:00
exportWithTemplate: mustacheFile into: folder
| tempDictionary modified |
tempDictionary := self asDictionary copy.
modified := self asDictionary at: 'profile-bio'.
modified := modified copyReplaceAll: '@' with: '\@'.
modified := modified copyReplaceAll: '_' with: '\_'.
modified := modified copyReplaceAll: '#' with: '\#'.
tempDictionary at: 'profile-bio' put: modified.
^ MarkupFile
exportAsFileOn: (folder / self userName , 'tex')
containing:(mustacheFile asMustacheTemplate value: tempDictionary)