summaryrefslogtreecommitdiff
path: root/search.php
diff options
context:
space:
mode:
Diffstat (limited to 'search.php')
-rw-r--r--search.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/search.php b/search.php
index c2845f7..44c964c 100644
--- a/search.php
+++ b/search.php
@@ -1,5 +1,7 @@
<?php
+ $version = 1.2
+
$config = false;
try {
if (!is_readable("config.ini")) {
@@ -30,6 +32,15 @@ try {
$args = explode(" ", $search);
$page = 1;
+ if (args[0] == "-v" || args[0] == "--version") {
+ echo $version + \n;
+ die();
+ } else if (args[0] == "-h" || args[0] == "--help") {
+ echo "Usage: !blaup [query] #[page] | e.g: !blaup intense | !blaup intense marcus | "
+ echo "!blaup intense marcus #2 (returns the second page of results)\n"
+ die();
+ }
+
// Check to see if user specified pagination
$pages = array_filter($args, function($elem) {
if (strpos($elem, "#") === 0) {