Improving temporal storage as STON files.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-05 16:16:09 -05:00
parent 570010efca
commit 1f665368c1

View File

@ -1,9 +1,11 @@
accessing
store
| localFolder parameters |
| localFolder parameters host profile |
parameters := self queryParameters .
(parameters class = NitterUser or: [ parameters class = TwitterUser ])
host := parameters asUrl host.
profile := parameters asUrl segments first.
host = NitterUser nitterProvider asUrl host
ifFalse: [ ^ self ].
localFolder := (self dataStore / 'web' / 'twitter.com' / parameters userName) ensureCreateDirectory.
localFolder := (self dataStore / 'web' / 'twitter.com' / profile) ensureCreateDirectory.
self tweets do: [:each | each exportInto: localFolder ].
^ localFolder