refreshing the logs scripts
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
# Note that the name might be misleading since currently only Firefox SQLite format is supported
|
||||
|
||||
ANHOURAGO=`date +%s --date "now 1 hour ago"`
|
||||
ADAYAGO=`date +%s --date "now 1 day ago"`
|
||||
AWEEKAGO=`date +%s --date "now 1 week ago"`
|
||||
DB=~/.mozilla/firefox/*.default/places.sqlite
|
||||
|
||||
@@ -27,7 +28,8 @@ echo -e "\ntop 10 visited URL in general"
|
||||
echo "this week"
|
||||
#sqlite3 -list -line $DB "SELECT url,title,visit_date as moment FROM moz_historyvisits, moz_places WHERE moz_historyvisits.place_id = moz_places.id and visit_date>($AWEEKAGO*1000000)"
|
||||
echo "this hour"
|
||||
sqlite3 -list -line $DB "SELECT url,title,visit_date as moment FROM moz_historyvisits, moz_places WHERE moz_historyvisits.place_id = moz_places.id and visit_date>($ANHOURAGO*1000000)"
|
||||
#sqlite3 -list -line $DB "SELECT url,title,visit_date as moment FROM moz_historyvisits, moz_places WHERE moz_historyvisits.place_id = moz_places.id and visit_date>($ANHOURAGO*1000000)"
|
||||
#sqlite3 -list -line $DB "SELECT url,title,visit_date as moment FROM moz_historyvisits, moz_places WHERE moz_historyvisits.place_id = moz_places.id and visit_date>($ADAYAGO*1000000)"
|
||||
|
||||
URL=$1
|
||||
echo -e "\nhow many time URL X has been visited this week"
|
||||
@@ -44,12 +46,12 @@ echo -e "\nURLs visited between starting URL and ending URL"
|
||||
|
||||
|
||||
URLSLISTFILE=~/.urlstocheck
|
||||
SCRIPTURL=`grep '^\$ScriptUrl' ~/www/mirrors/fabien/local/config.php | grep -v 127 | sed -e "s/.*'\(.*\)';/\1/"`
|
||||
echo "" > $URLSLISTFILE
|
||||
ls ~/www/mirrors/fabien/wiki.d/ | grep -v "del-" | tr "." "/" | sed -e "s,^,$SCRIPTURL\/," >> $URLSLISTFILE
|
||||
while read line; do
|
||||
sqlite3 -column $DB "SELECT count(*),url FROM moz_historyvisits, moz_places WHERE moz_historyvisits.place_id = moz_places.id and url LIKE '$line'" | grep "0" && echo -e "\t$line"
|
||||
done < $URLSLISTFILE
|
||||
#SCRIPTURL=`grep '^\$ScriptUrl' ~/www/mirrors/fabien/local/config.php | grep -v 127 | sed -e "s/.*'\(.*\)';/\1/"`
|
||||
#echo "" > $URLSLISTFILE
|
||||
#ls ~/www/mirrors/fabien/wiki.d/ | grep -v "del-" | tr "." "/" | sed -e "s,^,$SCRIPTURL\/," >> $URLSLISTFILE
|
||||
#while read line; do
|
||||
# sqlite3 -column $DB "SELECT count(*),url FROM moz_historyvisits, moz_places WHERE moz_historyvisits.place_id = moz_places.id and url LIKE '$line'" | grep "0" && echo -e "\t$line"
|
||||
#done < $URLSLISTFILE
|
||||
echo -e "\nwhich URLs from this list have never been visited this week"
|
||||
echo -e "\nwhich URLs from this list have never been visited in general"
|
||||
# e.g. all wiki pages, all page from a wiki group (e.g. memory recall)
|
||||
|
||||
Reference in New Issue
Block a user