Closed rosemarybeetle closed 11 years ago
using saveStrings(), it is possible to save the harvested tweets.
this could be used in two ways. By saving a tweet list on load, the sketcth could use it as a fall back for any time it loses connection.
It may be possible to build up by appending too??
In order to harvest regularly, we need a new admin setting 'harvestRate'
I have now added a new admin setting, but it's not yet in use. The default setting is 60000, which is one minute (60,000 milliseconds)
I have also set up a word text file called uberWords. This is an expanding array that is appended with all the words created when grabTweets() is called. I have tested on load, but not yet done repeat loadings. In theory the uberWords array should get bigger each time (may need limiting) This can be used to load the mind if it can be grown. This should mean the last xxx words are used. It will need to be a rolling array, so some cut off will be needed.
Success! adding a millis() timer and a call checking a getTime versus lastTime (with reset) , grabTweets is now periodic depending on the adminsetting [4]
It is also appending each call to the words.txt file. This will fill up at a rate of 10KB per refresh, so 600Kb per hour. As the thing shouldn't be on more than 8 hours a day, this should be containable AS LONG AS the words file is restarted on initialisation. What it does mean though is that the draw function should read the words in reverse order. it might be worth dating them too to get a record of words collected.
As it stands it is not actually using the uberWords file so only a date may be needed
However not tested fully. Not sure new words are being fed in EXCEPT on first load...
Periodic update checking of both tweet crops and adminsettings is now working [00182fb79bd697f4d2d22e2ddc3d3f5ac98403bb]
Instead of loading a huge number of tweets, it may be better to refresh the tweets periodically. This means the Processing sketch that is filling up the Hive brain with content, can fill it up, then check back later for updates then fill it up again.
The question is how to do this.