From b4a63dacefa993f63aa4c5eaf0c8db4cc33e8b75 Mon Sep 17 00:00:00 2001 From: SBeans Date: Wed, 6 Mar 2013 12:30:44 +0000 Subject: changed -new to -a|--add --- blasource.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'blasource.php') diff --git a/blasource.php b/blasource.php index 5cc8793..50b55db 100644 --- a/blasource.php +++ b/blasource.php @@ -10,8 +10,9 @@ // 0.1.2 Checked -l page number to see if there are any results. // 0.2.0 Fixed -l so it shows 5 results. Added -c Count added -r remove and updated help // 0.2.1 Fixed -l (showing too many results) and -r (Not showing text of removed line + // 0.2.2 Changed -new to --add - $version = "BlaSource Version: 0.2.1"; + $version = "BlaSource Version: 0.2.2"; // get the input $stdin = read_stdin(); @@ -87,7 +88,8 @@ $out .= $temp; } break; - case "-new": + case "--add": + case "-a": $name = $stdin[$i+1]; $link = $stdin[$i+2]; $file_handle = fopen("blasource.txt", "rb"); @@ -100,7 +102,7 @@ $i = sizeof($stdin); break; case "-h": - $out = "-h for help, -v for version, -new e.g. !source -new gentoo-portage someurl.html. To view source:just enter a token or e.g. !source gentoo-portage or !source gentoo portage. -l will list the first page (5 records). -l X will show page X. -c returns count. -r X removes item X."; + $out = "-h for help, -v for version, -new e.g. !source --add(-a) gentoo-portage someurl.html. To view source:just enter a token or e.g. !source gentoo-portage or !source gentoo portage. -l will list the first page (5 records). -l X will show page X. -c returns count. -r X removes item X."; $i = sizeof($stdin); break; default: -- cgit v1.2.3