diff --git a/create.cgi b/create.cgi index 964437d..ff98753 100755 --- a/create.cgi +++ b/create.cgi @@ -100,17 +100,26 @@ else fi +echo "" + # Clean up in case it went wrong (e.g. trying to retrieve from an account with protected tweets) -test -s $oldpwd/u/$id/$id.txt || rm -rf $oldpwd/u/$id +if test -s "$oldpwd/u/$id/$id.txt" +then cd $oldpwd; ./users.sh > users.shtml cat <

Now to grep fetched tweets, goto http://$HTTP_HOST/u/$id

+END + +else + rm -rf $oldpwd/u/$id + echo '

Sorry the Twitter API is failing. Try again later.

' +fi + +cat < END - diff --git a/grep.php b/grep.php index 785dafa..77c2659 100644 --- a/grep.php +++ b/grep.php @@ -1,4 +1,5 @@ You are here - +
@@ -26,7 +26,7 @@

Type a search query like foo

- +
diff --git a/index.shtml b/index.shtml index 0d82377..f2522e4 100644 --- a/index.shtml +++ b/index.shtml @@ -5,7 +5,7 @@ GrepTweet - + @@ -16,7 +16,7 @@
@@ -48,8 +48,7 @@
- - +

New Try Grepbook for grepping Facebook.

Greppable tweeters

diff --git a/main.js b/main.js index 590be95..789c608 100644 --- a/main.js +++ b/main.js @@ -1,6 +1,6 @@ function grep(query) { - $.getJSON("/u/" + NAME + "/grep.php?q=" + query + "&jsoncallback=?", function(data) { + $.getJSON("/u/" + NAME + "/grep.php?jsoncallback=?", { q: query }, function(data) { var results = "

Searched for: " + query + "

    "; for (var i in data) { tweet = data[i].split('|'); @@ -20,7 +20,7 @@ $(document).ready(function() { NAME = window.location.pathname.split('/')[2]; $("#name").html(NAME); - $("input[type=text]").change(function() { + $("input[type=search]").change(function() { query = this.value; window.location.search = query; grep(query);