-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenres.php
More file actions
executable file
·36 lines (25 loc) · 891 Bytes
/
genres.php
File metadata and controls
executable file
·36 lines (25 loc) · 891 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
36
#!/usr/local/bin/php
<?php
$themes = json_decode(file_get_contents("themes.json"));
$newthemes = array();
$pdf = false;
$html = true;
$skip = array('elite', 'orbit');
foreach ($themes as $theme) {
$newthemes[] = $theme;
if (in_array($theme, $skip)) { continue; }
$results = `resume export resumes/{$theme}.html -t ./node_modules/jsonresume-theme-{$theme}/`;
//$resume = file_get_contents($surl);
print $theme." processed\n";
if ($pdf) {
if (file_exists("resumes/".$theme.".html")) {
$cmd = "wkhtmltopdf -R 0 -L 0 -B 0 -T 0 --page-size Letter --print-media-type resumes/" . $theme . ".html pdfs/$theme.pdf";
print $cmd."\n";
$results = `$cmd`;
print $results;
} else {
print "*** WARNING: Resume resumes/$theme.html does not exist. Skipping...\n";
}
}
}
?>