mirror of
https://github.com/thewesker/greptweet.git
synced 2025-12-21 12:41:04 -05:00
various cleanups
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# <http://greptweet.com>
|
||||
|
||||
* Authentication free, using <http://dev.twitter.com/doc/get/statuses/user_timeline>
|
||||
* 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 <http://twitter.github.com/bootstrap/>
|
||||
* Look and feel mostly by <http://twitter.github.com/bootstrap>
|
||||
* **Please** review and comment on the code!
|
||||
|
||||
# Known limitations
|
||||
@@ -35,7 +35,6 @@ I did file <https://dev.twitter.com/discussions/3414>, which later seemed to be
|
||||
|
||||
<http://stackoverflow.com/a/9022823/4534>
|
||||
|
||||
Make sure your httpd does utf8 all the time:
|
||||
|
||||
# TODO
|
||||
|
||||
Make fetch-tweets.sh return nicer output like a % for <http://twitter.github.com/bootstrap/components.html#progress>
|
||||
AddDefaultCharset utf-8
|
||||
|
||||
13
create.cgi
13
create.cgi
@@ -48,7 +48,7 @@ cat <<END
|
||||
|
||||
<h1 class="alert alert-info">Fetching upto 3200 tweets from $id</h1>
|
||||
|
||||
<p class="help-inline">Please be patient. Closing this page prematurely you can limit the tweets <a href="https://github.com/kaihendry/Greptweet/blob/master/fetch-tweets.sh">fetch-tweets.sh</a> gets and trigger a locking bug.</p>
|
||||
<p class="help-inline">Please be patient. Closing this page prematurely can limit the tweets <a href="https://github.com/kaihendry/Greptweet/blob/master/fetch-tweets.sh">fetch-tweets.sh</a> gets and trigger a locking bug.</p>
|
||||
|
||||
<pre>
|
||||
END
|
||||
@@ -90,11 +90,18 @@ echo "</pre>"
|
||||
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 <<END
|
||||
<a href="http://$id.greptweet.com"><h1 class="alert alert-success">Goto http://$id.greptweet.com to grep!</h1></a>
|
||||
END
|
||||
else
|
||||
cat <<END
|
||||
<a href="http://$HTTP_HOST/u/$id"><h1 class="alert alert-success">Goto http://$HTTP_HOST/u/$id to grep!</h1></a>
|
||||
END
|
||||
fi
|
||||
|
||||
else
|
||||
rm -rf $oldpwd/u/$id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# vim: set ts=4 sw=4
|
||||
|
||||
umask 002
|
||||
|
||||
6
index.js
6
index.js
@@ -1,6 +0,0 @@
|
||||
function submitPressed() {
|
||||
if (document.forms.f.checkValidity()) {
|
||||
$("#b").button('loading');
|
||||
document.forms.f.submit();
|
||||
}
|
||||
}
|
||||
19
index.shtml
19
index.shtml
@@ -6,9 +6,6 @@
|
||||
<meta content="width=device-width, initial-scale=1,maximum-scale=1.0;" name=viewport>
|
||||
<link rel="stylesheet" href="/bootstrap/docs/assets/css/bootstrap.css">
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
||||
<script src="/bootstrap/js/bootstrap-button.js"></script>
|
||||
<script src="index.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -31,25 +28,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" name="o">Fetch older tweets, instead of newer tweets when updating
|
||||
</label>
|
||||
|
||||
|
||||
<button class="btn btn-large btn-primary" id="b" data-loading-text="Fetching tweets..." onclick="submitPressed()">Fetch tweets</button>
|
||||
<button class="btn btn-large btn-primary" id="b" onclick="submitPressed()">Fetch tweets</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<p><span class="label label-success">New</span> Try <a href="http://grepbook.co.uk/">Grepbook</a> for grepping Facebook</p>
|
||||
|
||||
<h3>Greppable tweeters</h3>
|
||||
|
||||
<!--#include virtual="users.shtml" -->
|
||||
<p>Try <a href="http://grepbook.co.uk/">Grepbook</a> for grepping Facebook</p>
|
||||
|
||||
<footer>
|
||||
<p>Please <a href="https://github.com/kaihendry/Greptweet">contribute to the source on Github</a> :)</p>
|
||||
<p>Please <a href="https://github.com/kaihendry/Greptweet">contribute on Github</a> :)</p>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user