diff options
-rw-r--r-- | blasource.php | 8 |
1 files changed, 5 insertions, 3 deletions
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 <some-string-like-this> <someurl.html> e.g. !source -new gentoo-portage someurl.html. To view source:just enter a token <like-this-one> or <like this one> 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 <some-string-like-this> <someurl.html> e.g. !source --add(-a) gentoo-portage someurl.html. To view source:just enter a token <like-this-one> or <like this one> 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: |