From 128e753561ab887cbf4b6d04900d05b88fd4027a Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 9 Feb 2017 18:21:17 +0100 Subject: [PATCH] Add the helper script tests/tweeper_file The script allows to scrape a local file, this speeds up development and testing. --- tests/tweeper_file | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tests/tweeper_file diff --git a/tests/tweeper_file b/tests/tweeper_file new file mode 100755 index 0000000..15de10c --- /dev/null +++ b/tests/tweeper_file @@ -0,0 +1,25 @@ +#!/usr/bin/env php + \n"; + +if ($argc < 3) { + fwrite(STDERR, $usage); + exit(1); +} + +$file_url = 'file://' . realpath($argv[1]); +$host = $argv[2]; + +$tweeper = new Tweeper(); +$output = $tweeper->tweep($file_url, $host, false); +if (is_null($output)) { + exit(1); +} +echo $output; -- 2.1.4