aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlista Kanjo2023-05-29 17:28:57 -0400
committerBlista Kanjo2023-05-29 17:28:57 -0400
commitef6e4abd50af3f07b8f42bae7430917aec6b5e4d (patch)
treef6c15163ecb26dd6f1483941ea84057ade8483ae
parentbfe25a65e46475cd76e64b64c47bed08f992b80c (diff)
feat: 16:9 conversion logic
-rw-r--r--download.php122
-rw-r--r--index.php24
2 files changed, 140 insertions, 6 deletions
diff --git a/download.php b/download.php
index 405c6d8..4e6039c 100644
--- a/download.php
+++ b/download.php
@@ -36,7 +36,7 @@
<div class="centered">
<?php
- if(isset($_POST['test169']))
+ if(isset($_POST['90sMakeUpCommercial']))
{
$_SESSION['pres'] = uniqid('pres', true) . '.md';
$_SESSION['push'] = uniqid('push', true) . '.md';
@@ -54,7 +54,7 @@
$conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/test169.md output/'$push' > output/'$convert'");
+ shell_exec("cat output/90sMakeUpCommercial.md output/'$push' > output/'$convert'");
shell_exec($conversion);
// sleep(1); ?>
@@ -64,7 +64,7 @@
<?php
- if(isset($_POST['defaultIsKing']))
+ if(isset($_POST['chicagoOlives']))
{
$_SESSION['pres'] = uniqid('pres', true) . '.md';
$_SESSION['push'] = uniqid('push', true) . '.md';
@@ -82,13 +82,127 @@
$conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec("cat output/defaultIsKing.md output/'$push' > output/'$convert'");
+ shell_exec("cat output/chicagoOlives.md output/'$push' > output/'$convert'");
+ shell_exec($conversion);
+ // sleep(1); ?>
+
+ <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+
+ <?php } ?>
+
+ <?php
+
+ if(isset($_POST['cleanMetropolis']))
+ {
+ $_SESSION['pres'] = uniqid('pres', true) . '.md';
+ $_SESSION['push'] = uniqid('push', true) . '.md';
+ $_SESSION['convert'] = uniqid('convert', true) . '.md';
+ $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+
+ $pres = $_SESSION['pres']; // filename of the template file with metadata
+ $push = $_SESSION['push']; // filename of where the user data is stored
+ $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
+ $filename = $_SESSION['filename']; // output file name
+
+
+ $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec("cat output/cleanMetropolis.md output/'$push' > output/'$convert'");
+ shell_exec($conversion);
+ // sleep(1); ?>
+
+ <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+
+ <?php } ?>
+
+ <?php
+
+ if(isset($_POST['ohioCustard']))
+ {
+ $_SESSION['pres'] = uniqid('pres', true) . '.md';
+ $_SESSION['push'] = uniqid('push', true) . '.md';
+ $_SESSION['convert'] = uniqid('convert', true) . '.md';
+ $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+
+ $pres = $_SESSION['pres']; // filename of the template file with metadata
+ $push = $_SESSION['push']; // filename of where the user data is stored
+ $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
+ $filename = $_SESSION['filename']; // output file name
+
+
+ $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec("cat output/ohioCustard.md output/'$push' > output/'$convert'");
shell_exec($conversion);
// sleep(1); ?>
<h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
<?php } ?>
+
+ <?php
+
+ if(isset($_POST['raleighAroundMe']))
+ {
+ $_SESSION['pres'] = uniqid('pres', true) . '.md';
+ $_SESSION['push'] = uniqid('push', true) . '.md';
+ $_SESSION['convert'] = uniqid('convert', true) . '.md';
+ $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+
+ $pres = $_SESSION['pres']; // filename of the template file with metadata
+ $push = $_SESSION['push']; // filename of where the user data is stored
+ $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
+ $filename = $_SESSION['filename']; // output file name
+
+
+ $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec("cat output/raleighAroundMe.md output/'$push' > output/'$convert'");
+ shell_exec($conversion);
+ // sleep(1); ?>
+
+ <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+
+ <?php } ?>
+
+ <?php
+
+ if(isset($_POST['earlyCupertino']))
+ {
+ $_SESSION['pres'] = uniqid('pres', true) . '.md';
+ $_SESSION['push'] = uniqid('push', true) . '.md';
+ $_SESSION['convert'] = uniqid('convert', true) . '.md';
+ $_SESSION['filename'] = uniqid('procrastiSlides_', true) . '.pdf';
+
+ $pres = $_SESSION['pres']; // filename of the template file with metadata
+ $push = $_SESSION['push']; // filename of where the user data is stored
+ $convert = $_SESSION['convert']; // concatanated file to be converted to .pdf
+ $filename = $_SESSION['filename']; // output file name
+
+
+ $userMarkdown = $_SESSION['user-input']; // this used to be _POST['user-input']
+ // $_SESSION['user-input'] = $_POST['user-input'];
+ $conversion = "pandoc -f markdown+hard_line_breaks output/'$convert' -t beamer -o output/'$filename' --pdf-engine=pdflatex";
+
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec("cat output/earlyCupertino.md output/'$push' > output/'$convert'");
+ shell_exec($conversion);
+ // sleep(1); ?>
+
+ <h2><a href="output/<?php echo $_SESSION['filename']; ?>">download presentation</a></h2>
+
+ <?php } ?>
+
+
<?php
if(isset($_POST['defaultIsKing']))
diff --git a/index.php b/index.php
index aaa7504..26bea81 100644
--- a/index.php
+++ b/index.php
@@ -47,8 +47,28 @@
<h2>select</h2>
</th>
<tr>
- <td>placeHolderImage<br></td>
- <td><button type="submit" name="test169">test169</button></td>
+ <td><img class=theme-select src="img/90sMakeUpCommercial.webp" alt="90sMakeUpCommercial"><br></td>
+ <td><button type="submit" name="90sMakeUpCommercial">90sMakeUpCommercial</button></td>
+ </tr>
+ <tr>
+ <td><img class=theme-select src="img/chicagoOlives.webp" alt="chicagoOlives"><br></td>
+ <td><button type="submit" name="chicagoOlives">chicagoOlives</button></td>
+ </tr>
+ <tr>
+ <td><img class=theme-select src="img/cleanMetropolis.webp" alt="cleanMetropolis"><br></td>
+ <td><button type="submit" name="cleanMetropolis">cleanMetropolis</button></td>
+ </tr>
+ <tr>
+ <td><img class=theme-select src="img/earlyCupertino.webp" alt="earlyCupertino"><br></td>
+ <td><button type="submit" name="earlyCupertino">earlyCupertino</button></td>
+ </tr>
+ <tr>
+ <td><img class=theme-select src="img/ohioCustard.webp" alt="ohioCustard"><br></td>
+ <td><button type="submit" name="ohioCustard">ohioCustard</button></td>
+ </tr>
+ <tr>
+ <td><img class=theme-select src="img/raleighAroundMe.webp" alt="raleighAroundMe"><br></td>
+ <td><button type="submit" name="raleighAroundMe">raleighAroundMe</button></td>
</tr>
<tr>
<td><img class=theme-select src="img/defaultIsKing.webp" alt="defaultIsKing"><br></td>