From: Antonio Ospite Date: Thu, 9 Feb 2017 17:21:17 +0000 (+0100) Subject: Add the helper script tests/tweeper_file X-Git-Tag: v1.1.0~8 X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/128e753561ab887cbf4b6d04900d05b88fd4027a?hp=b54460b67e0ad7a8b4c49b6ff15dba68ac575b1a Add the helper script tests/tweeper_file The script allows to scrape a local file, this speeds up development and testing. --- 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;