-
-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathtools_local.php
More file actions
executable file
·35 lines (24 loc) · 955 Bytes
/
tools_local.php
File metadata and controls
executable file
·35 lines (24 loc) · 955 Bytes
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
require_once('../config.php');
require_once('lib/Translation.class.php');
$benchmark_start = microtime_float();
$tools_dir = DISTDIR.'tools';
// Create Tools index
$index = CONTENTDIR."api_en/tools/index.html";
$page = new LocalPage('Tools', 'Tools', 'Tools', '../');
$page->content(file_get_contents($index));
writeFile('distribution/tools/index.html', $page->out());
// Create folder for images and copy them over
if (is_dir(DISTDIR.'tools/images')) {
rmdir(DISTDIR.'tools/images');
}
mkdir(DISTDIR.'tools/images', 0755);
copydirr(CONTENTDIR.'api_en/tools/images', DISTDIR.'tools/images');
// Copy file for the contributed Tools
require_once('./contributions.php');
copy(CONTENTDIR."static/tools.html", DISTDIR.'tools/tools.html');
$benchmark_end = microtime_float();
$execution_time = round($benchmark_end - $benchmark_start, 4);
?>
<h2>Local tool generation successful!</h2>
<p>Generated files in <?=$execution_time?> seconds.</p>