Fixing NitterUser asDictonary for export with template.
This commit is contained in:
parent
d66cc2a62c
commit
292cb444b4
@ -1,4 +1,4 @@
|
|||||||
accessing
|
accessing
|
||||||
downloadProfileImage
|
downloadProfileImage
|
||||||
|
|
||||||
self exportProfileImageOn: self folder / self userName, '.jpg'
|
^ self exportProfileImageOn: self folder / self userName, 'jpg'
|
@ -7,6 +7,5 @@ exportProfileImageOn: fileReference
|
|||||||
file exists ifFalse: [ file ensureCreateFile ].
|
file exists ifFalse: [ file ensureCreateFile ].
|
||||||
file binaryWriteStreamDo: [ :stream |
|
file binaryWriteStreamDo: [ :stream |
|
||||||
stream nextPutAll: profileImageUrl retrieveContents ].
|
stream nextPutAll: profileImageUrl retrieveContents ].
|
||||||
profileImageFile := file.
|
|
||||||
super class inform: 'Exported as: ', String cr, file fullName.
|
super class inform: 'Exported as: ', String cr, file fullName.
|
||||||
^ file
|
^ file
|
@ -1,9 +1,7 @@
|
|||||||
accessing
|
accessing
|
||||||
exportWithTemplate: mustacheFile On: folder
|
exportWithTemplate: mustacheFile On: folder
|
||||||
|
|
||||||
| mustacheDoc |
|
|
||||||
self exportProfileImageOn:folder / userName, '-profileImage.jpg'.
|
|
||||||
mustacheDoc := mustacheFile asMustacheTemplate value: self asDictionary.
|
|
||||||
MarkupFile
|
MarkupFile
|
||||||
exportAsFileOn: (folder / self userName , 'tex')
|
exportAsFileOn: (folder / self userName , 'tex')
|
||||||
containing: mustacheDoc
|
containing:(mustacheFile asMustacheTemplate value:
|
||||||
|
self asDictionary)
|
@ -14,7 +14,7 @@ externalWordCloud
|
|||||||
'--background' . 'white' .
|
'--background' . 'white' .
|
||||||
'--mode' . 'RGBA' .
|
'--mode' . 'RGBA' .
|
||||||
'--stopwords' . 'stopwords-es.txt' .
|
'--stopwords' . 'stopwords-es.txt' .
|
||||||
'--mask' . 'nube-mascara.jpg'};
|
'--mask' . '../commons/nube-mascara.jpg'};
|
||||||
workingDirectory: self folder fullName;
|
workingDirectory: self folder fullName;
|
||||||
redirectStdout;
|
redirectStdout;
|
||||||
redirectStderr;
|
redirectStderr;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
accessing
|
accessing
|
||||||
profileBio
|
profileBio
|
||||||
|
|
||||||
^ profileBio := (self documentTree xpath: '/html/body/div/div/div[2]/div[1]/div[2]/div[1]') stringValue
|
^ profileBio ifNil: [ profileBio := (self documentTree xpath: '/html/body/div/div/div[2]/div[1]/div[2]/div[1]') stringValue]
|
@ -0,0 +1,7 @@
|
|||||||
|
accessing
|
||||||
|
profileImageFile
|
||||||
|
|
||||||
|
| file |
|
||||||
|
file := (self folder / self userName, 'jpg').
|
||||||
|
file exists ifTrue: [ ^ file ].
|
||||||
|
^ self downloadProfileImage
|
@ -1,3 +0,0 @@
|
|||||||
accessing
|
|
||||||
profileImageFile
|
|
||||||
^ profileImageFile
|
|
@ -16,7 +16,6 @@
|
|||||||
"createdAt",
|
"createdAt",
|
||||||
"groups",
|
"groups",
|
||||||
"url",
|
"url",
|
||||||
"profileImageFile",
|
|
||||||
"profileBio"
|
"profileBio"
|
||||||
],
|
],
|
||||||
"name" : "TwitterUser",
|
"name" : "TwitterUser",
|
||||||
|
Loading…
Reference in New Issue
Block a user