From: Evan Prodromou Date: Sun, 28 Jun 2009 20:16:44 +0000 (+0000) Subject: twitter status fetcher takes an id argument X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a4d0f22b4b2907134779d7710f967c4841f6f938;p=quix0rs-gnu-social.git twitter status fetcher takes an id argument --- diff --git a/scripts/twitterstatusfetcher.php b/scripts/twitterstatusfetcher.php index 5ffdda58fa..8b10bfbadd 100755 --- a/scripts/twitterstatusfetcher.php +++ b/scripts/twitterstatusfetcher.php @@ -25,9 +25,14 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('MAXCHILDREN', 2); define('POLL_INTERVAL', 60); // in seconds +$shortoptions = 'i::'; +$longoptions = array('id::'); + $helptext = <<_id); } /** @@ -625,6 +630,16 @@ class TwitterStatusFetcher extends Daemon declare(ticks = 1); -$fetcher = new TwitterStatusFetcher(); +if (have_option('i')) { + $id = get_option_value('i'); +} else if (have_option('--id')) { + $id = get_option_value('--id'); +} else if (count($args) > 0) { + $id = $args[0]; +} else { + $id = null; +} + +$fetcher = new TwitterStatusFetcher($id); $fetcher->runOnce();