From 2436e95bd42501f96c9baeb59dce0e529b600f49 Mon Sep 17 00:00:00 2001 From: Kai Hendry Date: Sat, 7 Jul 2012 18:16:15 +0200 Subject: [PATCH] various cleanups --- README.md | 9 ++++----- create.cgi | 13 ++++++++++--- fetch-tweets.sh | 2 +- index.js | 6 ------ index.shtml | 19 +++---------------- users.sh | 9 --------- 6 files changed, 18 insertions(+), 40 deletions(-) delete mode 100644 index.js delete mode 100755 users.sh diff --git a/README.md b/README.md index eeed806..8e48d13 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # * Authentication free, using -* Aim to [suckless](http://suckless.org) by keeping lines of code low +* Aim to [suck less](http://suckless.org) by keeping lines of code low * Encourage folks to use `fetch-tweets.sh` themselves and get into shell ;) * Dependencies: curl, libhtml-parser-perl (to decode HTML entities), xmlstarlet, coreutils, PHP -* Look and feel mostly by +* Look and feel mostly by * **Please** review and comment on the code! # Known limitations @@ -35,7 +35,6 @@ I did file , which later seemed to be +Make sure your httpd does utf8 all the time: -# TODO - -Make fetch-tweets.sh return nicer output like a % for + AddDefaultCharset utf-8 diff --git a/create.cgi b/create.cgi index f27bbcd..67733a6 100755 --- a/create.cgi +++ b/create.cgi @@ -48,7 +48,7 @@ cat <Fetching upto 3200 tweets from $id -

Please be patient. Closing this page prematurely you can limit the tweets fetch-tweets.sh gets and trigger a locking bug.

+

Please be patient. Closing this page prematurely can limit the tweets fetch-tweets.sh gets and trigger a locking bug.

 END
@@ -90,11 +90,18 @@ echo "
" if test -s "$oldpwd/u/$id/$id.txt" then -cd $oldpwd; ./users.sh > users.shtml - +if echo $id | grep -q -v '_' # Underscores in domain names is a no no +then + mkdir /srv/www/$id.greptweet.com 2> /dev/null || true + echo Redirect / http://greptweet.com/u/$id > /srv/www/$id.greptweet.com/.htaccess +cat <

Goto http://$id.greptweet.com to grep!

+END +else cat <

Goto http://$HTTP_HOST/u/$id to grep!

END +fi else rm -rf $oldpwd/u/$id diff --git a/fetch-tweets.sh b/fetch-tweets.sh index dcaf310..37751d1 100755 --- a/fetch-tweets.sh +++ b/fetch-tweets.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # vim: set ts=4 sw=4 umask 002 diff --git a/index.js b/index.js deleted file mode 100644 index 014705f..0000000 --- a/index.js +++ /dev/null @@ -1,6 +0,0 @@ -function submitPressed() { - if (document.forms.f.checkValidity()) { - $("#b").button('loading'); - document.forms.f.submit(); - } -} diff --git a/index.shtml b/index.shtml index d797655..b396c6b 100644 --- a/index.shtml +++ b/index.shtml @@ -6,9 +6,6 @@ - - - @@ -31,25 +28,15 @@ - - - - - + -

New Try Grepbook for grepping Facebook

- -

Greppable tweeters

- - +

Try Grepbook for grepping Facebook

diff --git a/users.sh b/users.sh deleted file mode 100755 index 8c8e4b4..0000000 --- a/users.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -echo "
    " -for i in `ls -cd u/*` -do - user=$(basename $i | cut -d'.' -f1) - test "$user" == 'www' && continue - echo "
  • @${user}
  • " -done -echo "
"