diff --git a/Socialmetrica.package/Tweet.class/instance/exportInto..st b/Socialmetrica.package/Tweet.class/instance/exportInto..st new file mode 100644 index 0000000..c431afc --- /dev/null +++ b/Socialmetrica.package/Tweet.class/instance/exportInto..st @@ -0,0 +1,7 @@ +accessing +exportInto: aFolder + | file | + file := aFolder / self id, 'ston'. + ^ MarkupFile + exportAsFileOn: file + containing: (STON toStringPretty: self) \ No newline at end of file diff --git a/Socialmetrica.package/TweetsCollection.class/instance/store.st b/Socialmetrica.package/TweetsCollection.class/instance/store.st index aa1fcbc..580a706 100644 --- a/Socialmetrica.package/TweetsCollection.class/instance/store.st +++ b/Socialmetrica.package/TweetsCollection.class/instance/store.st @@ -3,5 +3,6 @@ store | localFolder parameters | parameters := self queryParameters . parameters class = NitterUser ifFalse: [ ^ self ]. - ^ localFolder := (self dataStore / parameters userName) ensureCreateDirectory. - \ No newline at end of file + localFolder := (self dataStore / parameters userName) ensureCreateDirectory. + self tweets do: [:each | each exportInto: localFolder ]. + ^ localFolder \ No newline at end of file