Fixing connection to ReStore DB in tweets collection.
This commit is contained in:
parent
02ab2bd74a
commit
b9eedc6ec3
@ -2,8 +2,8 @@ accessing
|
|||||||
externalWordCloud
|
externalWordCloud
|
||||||
|
|
||||||
| text outputFile |
|
| text outputFile |
|
||||||
outputFile := (self folder / 'nube.png')fullName.
|
outputFile := (self folder / 'nube.png') fullName.
|
||||||
text := (self folder / self userName, 'words', 'txt')fullName.
|
text := (self folder / 'words', 'txt') fullName.
|
||||||
OSSUnixSubprocess new
|
OSSUnixSubprocess new
|
||||||
command: 'wordcloud_cli';
|
command: 'wordcloud_cli';
|
||||||
arguments: { '--text' . text .
|
arguments: { '--text' . text .
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
accessing
|
accessing
|
||||||
getLocalMessages
|
getLocalMessages
|
||||||
"TO DO! This method should return messages from the local database"
|
"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 := Tweet storedInstances asOrderedCollection.
|
||||||
allTweets ifNil: [ ^ nil ].
|
allTweets ifNil: [ ^ nil ].
|
||||||
myTweets := TweetsCollection new.
|
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: myTweets.
|
||||||
^ self tweets
|
^ {self tweets. self userName. tempTweets}
|
||||||
|
|
@ -1,5 +1,7 @@
|
|||||||
accessing
|
accessing
|
||||||
storeDB
|
storeDB
|
||||||
| localDBFile |
|
| localDBFile localDBConnection |
|
||||||
localDBFile := FileLocator userData / 'Socialmetrica' / 'socialmetrica.sqlite'.
|
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