digitalmethodsinitiative / dmi-tcat

Digital Methods Initiative - Twitter Capture and Analysis Toolset
Apache License 2.0
367 stars 114 forks source link

A feature of a daily digest of numbers of tweets collected? #188

Open dormeir999 opened 8 years ago

dormeir999 commented 8 years ago

Hellow everyone,

Is there any feature of this kind, that presents that daily number of tweet or sends an email? I believe it will be beneficial for both the researchers using TCAT and the app's technical administrators.

thanks

ErikBorra commented 8 years ago

Hi @dormeir99o,

we agree that this would be a useful feature. In fact, we started working on it last week. We should still do some extensive testing, but think that we will be able to release it next week.

Best,

Erik

dormeir999 commented 8 years ago

I've written a bash script that queries the number of tweets and update time of each query bin, maybe it'll turn out usefull for you guys -

!/bin/bash

echo ====================TCAT STATUS CHECKUP======================= read -a arr <<< mysql --user=USER --password=PASS -e "use information_schema; select table_name from tables where TABLE_NAME REGEXP 'tweets';" 2>/dev/null | grep tweets echo "The number of querybins is ${#arr[@]}" for i in ${arr[@]} do echo The number of tweets and last writing time of $i are: mysql --user=USER --password=PASS -e "use twittercapture; select count(*) from $i;" 2>/dev/null mysql --user=USER --password=PASS -e "use information_schema; SELECT UPDATE_TIME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '$i';" 2>/dev/null done echo ====================TCAT STATUS CHECKUP=======================