39 parent::configure(); |
39 parent::configure(); |
40 |
40 |
41 $this |
41 $this |
42 ->setName('wikitag:query-wikipedia') |
42 ->setName('wikitag:query-wikipedia') |
43 ->setDescription('Query wikipedia for tags.') |
43 ->setDescription('Query wikipedia for tags.') |
44 ->addOption("force","f",InputOption::VALUE_NONE, "Force remove tags") |
44 ->addOption("force","f",InputOption::VALUE_NONE, "Force processing tags, will ask no confirmation") |
45 ->addOption("all","a",InputOption::VALUE_NONE, "all") |
45 ->addOption("all","a",InputOption::VALUE_NONE, "Search all tags") |
|
46 ->addOption("null","n",InputOption::VALUE_NONE, "Treat only non processed tags") |
46 ->addOption("redirection",null,InputOption::VALUE_NONE, "Treat redirections") |
47 ->addOption("redirection",null,InputOption::VALUE_NONE, "Treat redirections") |
47 ->addOption("random","r",InputOption::VALUE_NONE, "randomize query on tags") |
48 ->addOption("random","r",InputOption::VALUE_NONE, "randomize query on tags") |
48 ->addOption("site","S",InputOption::VALUE_OPTIONAL, "the url for the wikipedia site", "http://fr.wikipedia.org/w/api.php") |
49 ->addOption("site","S",InputOption::VALUE_OPTIONAL, "the url for the wikipedia site", "http://fr.wikipedia.org/w/api.php") |
49 ->addOption("limit","l",InputOption::VALUE_OPTIONAL, "number of tag to process", -1) |
50 ->addOption("limit","l",InputOption::VALUE_OPTIONAL, "number of tag to process", -1) |
50 ->addOption("start",null,InputOption::VALUE_OPTIONAL, "number of tag to ignore", 0); |
51 ->addOption("start",null,InputOption::VALUE_OPTIONAL, "number of tag to ignore", 0); |
58 $random = $input->getOption('random'); |
59 $random = $input->getOption('random'); |
59 $redirection = $input->getOption('redirection'); |
60 $redirection = $input->getOption('redirection'); |
60 $site = $input->getOption('site'); |
61 $site = $input->getOption('site'); |
61 $limit = intval($input->getOption('limit')); |
62 $limit = intval($input->getOption('limit')); |
62 $start = intval($input->getOption('start')); |
63 $start = intval($input->getOption('start')); |
|
64 $null = $input->getOption('null'); |
63 |
65 |
64 $doctrine = $this->getContainer()->get('doctrine'); |
66 $doctrine = $this->getContainer()->get('doctrine'); |
65 $qb = $doctrine->getEntityManager()->createQueryBuilder(); |
67 $qb = $doctrine->getEntityManager()->createQueryBuilder(); |
66 |
68 |
67 |
69 |