-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.php
70 lines (62 loc) · 2.13 KB
/
config.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* OCR server config file.
*/
/**
* General application configuration settings.
*/
$paths = array(
// Paths to the directories where uploaded imgages and their derivative
// OCR transcripts are stored. Must end in / and be writable by the web
// server.
'image_base_dir' => '/tmp/ocr_images/',
'transcript_base_dir' => '/tmp/ocr_transcripts/',
// Path to the OCR engine.
'ocr_engine' => "/usr/bin/tesseract"
);
/**
* Boolean to turn on or off basic debug logging (which is written to STDERR,
* in most cases your web server's error log). You may want to set this to
* false during production.
*/
$log_enabled = true;
/**
* Maximum time for the REST server to execute, in seconds. Performing OCR can
* take some time, and this setting overrides the 'max_execution_time'
* directive in your web server's php.ini for this script only.
*/
$max_exection_time = 240;
/**
* List of token strings that authorize clients to access this ocr server.
* Leave empty if you don't want to restrict access. Clients must send the
* X-Auth-Key request header containing a key from this list. Tokens can be
* as long or short as you want - it's up to you.
*/
$tokens = array(
// 'b692d302-3435', '484d-9c1f-e4e34a4a8f92'
);
/**
* List of regexes matching client IP addresses allowed to access this ocr
* server. Leave empty if you don't want to restrict access by IP address.
*/
$allowed_ip_addresses = array(
// '/^123\.243\.(\d+)\.(\d+)/', // For range 123.243.0.0 - 123.243.255.255.
);
/**
* List of file extensions on files that are allowed to be PUT to this OCR server.
* If you are processing files not represented in this list, add their extensions.
*/
$allowed_image_extensions = array(
'jpg', 'jpeg', 'jp2', 'tif', 'tiff'
);
/**
* List of other OCR REST server /page endpoints that will accept requests
* from clients of this ORC REST server. Useful in load distribution. Refer
* to README.md for more information.
*/
$alternates = array(
// 'http://ocr1.example.com/ocr_rest/page',
// 'http://ocr2.example.com/ocr_rest/page',
// 'http://ocr3.example.com/ocr_rest/page',
// 'http://ocr4.example.com/ocr_rest/page',
);