-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgenerate
More file actions
31 lines (26 loc) · 799 Bytes
/
Copy pathgenerate
File metadata and controls
31 lines (26 loc) · 799 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
<?php
include_once 'init.php';
echo "\nGenerating to ". Config::get('output'). "\n\n";
// Generate text file
if(true === ($textFile = Make::textFile($collection))) {
echo "Generated TEXT file.\n";
} else {
echo '~ Failed to create TEXT file. '. $textFile. "\n";
}
// Generate JSON file
if(true === ($jsonFile = Make::jsonFile($collection))) {
echo "Generated JSON file.\n";
} else {
echo '~ Failed to create JSON file. '. $jsonFile. "\n";
}
/**
* Generate as various arrays
* JavaScript
* PHP
*/
if(true === ($variousArrays = Make::variousArrays($collection))) {
echo "Generated as various arrays.\n";
} else {
echo '~ Failed to create various arrays. '. $variousArrays. "\n";
}
echo "\nGenerated a total of ", count($collection), ' quotes from ', count($authors), " authors\n";