Skip to content
Browse files

DownloadAll now takes --date parameter

  • Loading branch information...
1 parent 45cc7af commit 275419aa143c92f44dee020256d1d7c66c8e0cf8 Bibek Shrestha committed May 9, 2012
Showing with 11 additions and 5 deletions.
  1. +11 −5 example/DownloadAll.php
View
16 example/DownloadAll.php
@@ -1,23 +1,29 @@
<?php
require_once('../src/bootstrap.php');
+$params = getopt(null, array("date::"));
+
+$date = date('Y-m-d');
+if (isset($params['date']) && $params['date'] ) {
+ $date = $params['date'];
+}
// KTMPost
$obj = new NNPG_Generator();
-$obj->generate('KTMPost', date('Y-m-d'));
+$obj->generate('KTMPost', $date);
// Kantipur
$obj = new NNPG_Generator();
-$obj->generate('Kantipur', date('Y-m-d'));
+$obj->generate('Kantipur', $date);
// Republica
$obj = new NNPG_Generator();
-$obj->generate('Republica', date('Y-m-d'));
+$obj->generate('Republica', $date);
// Nagarik
$obj = new NNPG_Generator();
-$obj->generate('Nagarik', date('Y-m-d'));
+$obj->generate('Nagarik', $date);
// THT
// Nagarik
$obj = new NNPG_Generator();
-$obj->generate('THT', date('Y-m-d'));
+$obj->generate('THT', $date);

0 comments on commit 275419a

Please sign in to comment.
Something went wrong with that request. Please try again.