summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author53hornet <atc@53hor.net>2021-09-12 18:12:54 -0400
committer53hornet <atc@53hor.net>2021-09-12 18:12:54 -0400
commit7645795417a40d9545c2d2266600b99aa843d3de (patch)
tree01e23153e322704fa92f69d4a915b8b267e4ff6f
parent6ed47e694b69c79a1959074bde749c0f4029d14a (diff)
download53hor-7645795417a40d9545c2d2266600b99aa843d3de.tar.xz
53hor-7645795417a40d9545c2d2266600b99aa843d3de.zip
feat: php script for mutool convert
-rw-r--r--cv.php4
-rwxr-xr-xcv.sh6
-rw-r--r--hire.php2
3 files changed, 5 insertions, 7 deletions
diff --git a/cv.php b/cv.php
new file mode 100644
index 0000000..53ffaff
--- /dev/null
+++ b/cv.php
@@ -0,0 +1,4 @@
+<?php
+header('content-type: application/pdf');
+exec('/usr/local/bin/mutool convert -F pdf -o /tmp/cv.pdf cv.html');
+passthru('/bin/cat /tmp/cv.pdf');
diff --git a/cv.sh b/cv.sh
deleted file mode 100755
index b61e9b3..0000000
--- a/cv.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# Converts CV to downloadable PDF.
-
-printf 'content-type: application/pdf\n\n'
-mutool convert -F pdf cv.html
diff --git a/hire.php b/hire.php
index dd1a992..fd17180 100644
--- a/hire.php
+++ b/hire.php
@@ -31,7 +31,7 @@ include('./includes/head.php');
<p>
- Below is my CV and other related professional history. You may also <a href="/cgi-bin/cv.sh">download my CV as a PDF</a>.
+ Below is my CV and other related professional history. You may also <a href="/cv.sh">download my CV as a PDF</a>.
</p>
<hr />