Fixing connection to ReStore DB in tweets collection.
This commit is contained in:
parent
02ab2bd74a
commit
b9eedc6ec3
@ -2,8 +2,8 @@ accessing
|
||||
externalWordCloud
|
||||
|
||||
| text outputFile |
|
||||
outputFile := (self folder / 'nube.png')fullName.
|
||||
text := (self folder / self userName, 'words', 'txt')fullName.
|
||||
outputFile := (self folder / 'nube.png') fullName.
|
||||
text := (self folder / 'words', 'txt') fullName.
|
||||
OSSUnixSubprocess new
|
||||
command: 'wordcloud_cli';
|
||||
arguments: { '--text' . text .
|
||||
|
@ -1,12 +1,15 @@
|
||||
accessing
|
||||
getLocalMessages
|
||||
"TO DO! This method should return messages from the local database"
|
||||
| allTweets myTweets |
|
||||
| allTweets myTweets tempTweets tempUsername |
|
||||
|
||||
tempUsername := self userName.
|
||||
TweetsCollection storeDB.
|
||||
allTweets := Tweet storedInstances asOrderedCollection.
|
||||
allTweets ifNil: [ ^ nil ].
|
||||
myTweets := TweetsCollection new.
|
||||
myTweets tweets: (allTweets select: [ :each | each timelines isNotEmpty and: [each timelines keys first = self userName] ] ).
|
||||
tempTweets := allTweets select: [ :each | each timelines isNotEmpty and: [each timelines keys first = tempUsername] ].
|
||||
myTweets tweets: tempTweets.
|
||||
self tweets: myTweets.
|
||||
^ self tweets
|
||||
^ {self tweets. self userName. tempTweets}
|
||||
|
@ -1,5 +1,7 @@
|
||||
accessing
|
||||
storeDB
|
||||
| localDBFile |
|
||||
| localDBFile localDBConnection |
|
||||
localDBFile := FileLocator userData / 'Socialmetrica' / 'socialmetrica.sqlite'.
|
||||
^ ReStore connection: (SSWSQLite3Connection on: localDBFile fullName).
|
||||
localDBConnection := ReStore connection: (SSWSQLite3Connection on: localDBFile fullName).
|
||||
localDBConnection isConnected ifFalse: [ ^ localDBConnection connect ].
|
||||
^ localDBConnection
|
Loading…
Reference in New Issue
Block a user