-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
41 lines (29 loc) · 795 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
36
37
38
39
40
41
<?php
/*doc index.php
Versión : 1.0
Fecha : 2018-06-13
Autor : Nelson Sánchez Bernal ([email protected])
--------------------------------------------------------------
DISCLAIMER:
Use only for didactical purpose.
--------------------------------------------------------------
doc*/
include_once 'autoload.php';
// Leo Archivo de instrucciones
if( !isset($argv[1]) || !isset($argv[2]) ){
echo "Parameter empty";
exit;
}
$source = json_decode(file_get_contents($argv[1]),true);
$destinationFile = $argv[2];
//print_r($source);
// Creo Objeto robot
$robot = new Robot();
$robot->setDebug(true);
$exito = $robot->setData($source)->startClean($destinationFile);
if ($exito==true){
echo "Process Finished Successfully";
}else {
echo "Process Finished with Errors";
}
?>