Creating default exporter for tex template.
This commit is contained in:
parent
c9d9ec9620
commit
f28e884a79
@ -1,7 +1,7 @@
|
||||
accessing
|
||||
asDictionary
|
||||
|
||||
^ { 'profile-card-avatar' -> self profileImageFile fullName.
|
||||
^ { 'profile-card-avatar' -> self profileImageFile values first fullName.
|
||||
'profile-card-fullname' -> self name .
|
||||
'profile-card-username' -> self userName .
|
||||
'profile-bio' -> self profileBio } asDictionary
|
@ -0,0 +1,4 @@
|
||||
accessing
|
||||
exportDefaultReport
|
||||
|
||||
^ self exportWithTemplate: TweetsCollection dataStore / 'templates' / 'template.mus.tex' into: self folder
|
@ -14,7 +14,7 @@ exportProfileImageOn: fileReference
|
||||
tempFile := FileLocator temp / fileReference basename.
|
||||
tempFile ensureCreateFile.
|
||||
tempFile binaryWriteStreamDo: [ :stream |
|
||||
stream nextPutAll: profileImageUrl retrieveContents.
|
||||
stream nextPutAll: profileImageUrl asUrl retrieveContents.
|
||||
super class
|
||||
inform: 'Exported as: ', String cr, tempFile fullName. ].
|
||||
|
||||
|
@ -6,7 +6,8 @@ exportWithTemplate: mustacheFile into: folder
|
||||
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
|
||||
^ MarkupFile
|
||||
exportAsFileOn: (folder / self userName , 'tex')
|
||||
containing:(mustacheFile asMustacheTemplate value: tempDictionary)
|
Loading…
Reference in New Issue
Block a user