-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
49 lines (34 loc) · 986 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
42
43
44
45
46
47
48
49
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
error_reporting(E_ALL);
$fontpath = realpath('/usr/share/fonts/freesans-font/');
putenv('GDFONTPATH='.$fontpath);
require_once 'processProquest.php';
// Requires a single parameter containing the location of an initialization file.
if (!isset($argv[1])){
usage();
exit(1);
}
// Debug is off by default
$debug = false;
// Create the $process object.
$process = new processProquest($argv[1], $debug);
// Initialize FTP connection.
$process->initFTP();
// Get zip files from FTP server, unzip and store locally.
$process->getFiles();
// Connect to Fedora through API.
$process->initFedoraConnection();
// Process each zip file.
$process->processFiles();
// Ingest each processed zip file into Fedora.
$process->ingest();
exit(1);
function usage() {
echo "Usage: php index.php processProquest.ini\n";
echo "(See README.md for configuration info)";
}
?>