From 598a903aac68d750ed0c16bb76a4eaca64b885f1 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Sat, 16 Jul 2011 22:57:06 +0200 Subject: [PATCH] slow solution to check the presence of many URLs from a file --- shell_scripts/browser_queries | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shell_scripts/browser_queries b/shell_scripts/browser_queries index 47669c8..936f674 100755 --- a/shell_scripts/browser_queries +++ b/shell_scripts/browser_queries @@ -43,7 +43,13 @@ echo -e "\nURLs visited between starting URL and ending URL" # as first done with http://fabien.benetou.fr/Events/DrumbeatParis#VisitedLinks -URLSLISTFILE=~/urlstocheck +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 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)