From afbb61ffd989c66b325c67857057d7442c465e8d Mon Sep 17 00:00:00 2001 From: ruidajo Date: Tue, 29 Mar 2022 18:11:22 -0500 Subject: [PATCH] Adding configuration variables. --- .../NitterUser.class/instance/config..st | 4 ++++ .../NitterUser.class/instance/config.st | 4 ++++ .../instance/downloadProfileImage.st | 4 ++++ .../instance/exportWithTemplate.On..st | 12 +++++------- .../NitterUser.class/instance/folder.st | 4 ++++ .../NitterUser.class/properties.json | 4 +++- 6 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 Datanalitica.package/NitterUser.class/instance/config..st create mode 100644 Datanalitica.package/NitterUser.class/instance/config.st create mode 100644 Datanalitica.package/NitterUser.class/instance/downloadProfileImage.st create mode 100644 Datanalitica.package/NitterUser.class/instance/folder.st diff --git a/Datanalitica.package/NitterUser.class/instance/config..st b/Datanalitica.package/NitterUser.class/instance/config..st new file mode 100644 index 0000000..ccb78a3 --- /dev/null +++ b/Datanalitica.package/NitterUser.class/instance/config..st @@ -0,0 +1,4 @@ +accessing +config: aDictionary + + config := aDictionary \ No newline at end of file diff --git a/Datanalitica.package/NitterUser.class/instance/config.st b/Datanalitica.package/NitterUser.class/instance/config.st new file mode 100644 index 0000000..68e5e4a --- /dev/null +++ b/Datanalitica.package/NitterUser.class/instance/config.st @@ -0,0 +1,4 @@ +accessing +config + + ^ config \ No newline at end of file diff --git a/Datanalitica.package/NitterUser.class/instance/downloadProfileImage.st b/Datanalitica.package/NitterUser.class/instance/downloadProfileImage.st new file mode 100644 index 0000000..1c167f6 --- /dev/null +++ b/Datanalitica.package/NitterUser.class/instance/downloadProfileImage.st @@ -0,0 +1,4 @@ +accessing +downloadProfileImage + + self exportProfileImageOn: self folder / self userName, '.jpg' \ No newline at end of file diff --git a/Datanalitica.package/NitterUser.class/instance/exportWithTemplate.On..st b/Datanalitica.package/NitterUser.class/instance/exportWithTemplate.On..st index 0ff7998..8171291 100644 --- a/Datanalitica.package/NitterUser.class/instance/exportWithTemplate.On..st +++ b/Datanalitica.package/NitterUser.class/instance/exportWithTemplate.On..st @@ -1,11 +1,9 @@ accessing -exportWithTemplate: mustacheFile On: fileReference +exportWithTemplate: mustacheFile On: folder - | directory data mustacheDoc | - directory := fileReference parent. - data := self asDictionary. - self exportProfileImageOn:directory / userName, '-profileImage.jpg'. - mustacheDoc := mustacheFile asMustacheTemplate value: data. + | mustacheDoc | + self exportProfileImageOn:folder / userName, '-profileImage.jpg'. + mustacheDoc := mustacheFile asMustacheTemplate value: self asDictionary. MarkupFile - exportAsFileOn: (directory / (data at:'profile-card-username') asDashedLowercase , 'tex') + exportAsFileOn: (folder / self userName , 'tex') containing: mustacheDoc \ No newline at end of file diff --git a/Datanalitica.package/NitterUser.class/instance/folder.st b/Datanalitica.package/NitterUser.class/instance/folder.st new file mode 100644 index 0000000..140885f --- /dev/null +++ b/Datanalitica.package/NitterUser.class/instance/folder.st @@ -0,0 +1,4 @@ +accessing +folder + + ^ self config at: 'folder'. \ No newline at end of file diff --git a/Datanalitica.package/NitterUser.class/properties.json b/Datanalitica.package/NitterUser.class/properties.json index f174467..ee3f226 100644 --- a/Datanalitica.package/NitterUser.class/properties.json +++ b/Datanalitica.package/NitterUser.class/properties.json @@ -5,7 +5,9 @@ "classinstvars" : [ ], "pools" : [ ], "classvars" : [ ], - "instvars" : [ ], + "instvars" : [ + "config" + ], "name" : "NitterUser", "type" : "normal" } \ No newline at end of file