-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
35 lines (32 loc) · 989 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
define("DS", DIRECTORY_SEPARATOR);
require "Exceptions/IdTagException.php";
require "classes/IdTag.php";
require "classes/Worker.php";
require "classes/Rule.php";
if ( isset($argv[1]) and is_dir(realpath($argv[1]))) {
$target_dir = realpath($argv[1]) . DS;
printf("%5s","-----");
printf("%20s","AutoTagger");
printf("%5s\n","-----");
printf("%5s","R = ");
printf("%25s\n","Tag V1 Removed");
printf("%5s","W = ");
printf("%25s\n","Tag V2.4 Written");
echo "------------------------------\n";
try {
$idTag = new IdTag();
$idTag->setV1TagHandling("remove");
$worker = new Worker($idTag);
/**
* Choose your directory where your rules are located.
*/
$worker->loadRules(__DIR__ . DS . "rules" . DS);
$worker->scanFolder($target_dir);
echo "\n";
} catch (Exception $exc) {
echo $exc->getMessage();
}
} else {
echo "\nSorry, folder was not found\n";
}