diff --git a/create.cgi b/create.cgi index 309c9ff..56c8049 100755 --- a/create.cgi +++ b/create.cgi @@ -1,5 +1,6 @@ #!/bin/bash -e # vim: set ts=4 sw=4 +# apache_setenv('no-gzip', '1'); exec 2>&1 cat < $temp2; test $(wc -l < $temp2) -gt 0; +while urlargs="screen_name=${1}&count=200&page=${page}${since}&include_rts=1&trim_user=0"; echo $urlargs; $(dirname $0)/oauth.php $urlargs | +$(dirname $0)/json-to-text.php > $temp2; test $(wc -l < $temp2) -gt 0; do #cat temp2 diff --git a/index.shtml b/index.shtml index 5c9fd38..8c7ee58 100644 --- a/index.shtml +++ b/index.shtml @@ -59,7 +59,7 @@ if (user) { window.location.replace("/u/" + user); }

Super-geeks please report issues and contribute on Github :)

Active accounts:

Version: >

-

Backup: rsync -artzv --include "*/" --include "*.txt" --exclude "*" --exclude "tweets.txt" greptweet.com::greptweet . - go get your data!

+

Backup: rsync -artzv --include "*/" --include "*.txt" --exclude "*" --exclude "tweets.txt" greptweet.com::greptweet .

diff --git a/json-to-text.php b/json-to-text.php new file mode 100755 index 0000000..2483e96 --- /dev/null +++ b/json-to-text.php @@ -0,0 +1,29 @@ +#!/usr/bin/env php +id_str . "|"; + echo $foo[$i]->created_at . "|"; + $tweet = $foo[$i]->text; + if (!empty($foo[$i]->entities->urls)) { + foreach($foo[$i]->entities->urls as $u) { + //print_r($u->url); + ////print_r($u->expanded_url); + $tweet = str_replace($u->url,$u->expanded_url,$tweet); + } + } + if (!empty($foo[$i]->entities->media)) { + foreach($foo[$i]->entities->media as $m) { + //print_r($u->url); + ////print_r($u->expanded_url); + $tweet = str_replace($m->url,$m->media_url,$tweet); + } + } + echo $tweet . "\n"; +} +//print_r($foo); +//$pp = json_encode($foo, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES); +//echo $pp; +?>