aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkj_sh6042023-07-09 00:47:08 -0400
committerkj_sh6042023-07-09 00:47:08 -0400
commitb12a66beaecad509249fc45f31da7416e4ee71fd (patch)
treee986899c8aca9f43d050459bf13c3afbccd7e19d
parentef92a53a6ede6d1be420267e8218833ef8dffb2a (diff)
kj.bash: download.php
Diffstat (limited to '')
-rw-r--r--download.php369
1 files changed, 169 insertions, 200 deletions
diff --git a/download.php b/download.php
index f54f99b..af207d5 100644
--- a/download.php
+++ b/download.php
@@ -1,39 +1,38 @@
<?php session_start(); ?>
<!DOCTYPE html>
<html lang=en>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
- <link rel="stylesheet" href="css/style.css">
- <link rel = "icon" href = "img/site-icon.webp" type = "image/x-icon">
- <link rel="stylesheet" href="https://cdn.rawgit.com/xcatliu/simplemde-theme-dark/master/dist/simplemde-theme-dark.min.css
+
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
+ <link rel="stylesheet" href="css/style.css">
+ <link rel="icon" href="img/site-icon.webp" type="image/x-icon">
+ <link rel="stylesheet" href="https://cdn.rawgit.com/xcatliu/simplemde-theme-dark/master/dist/simplemde-theme-dark.min.css
">
- <script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
- <title>procrastiSlides: great for procratinators who need to get a presentation out, quick! πŸ˜†</title>
- <meta name="description" content="create presentations from markdown or plain text! πŸ€— procrastiSlides is a simple presentation(s) site that respects your dark mode setting and has responsive web design.
+ <script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
+ <title>procrastiSlides: great for procratinators who need to get a presentation out, quick! πŸ˜†</title>
+ <meta name="description" content="create presentations from markdown or plain text! πŸ€— procrastiSlides is a simple presentation(s) site that respects your dark mode setting and has responsive web design.
non-intruisive ads, no tracking, nothing but quick slides from plain text/markdown. 🏫 try copy and pasting your school notes! that might even work πŸ˜‚">
- </head>
- <body>
- <div class=banner>
- <h1>πŸ“‘ procrastiSlides v0.02 🎬</h1>
- <hr/>
- </div>
- <p class="centered">this website is inspired from the suckless's presentation tool (<a target="_blank" href="https://tools.suckless.org/sent">sent</a>)
- and Luke Smith's <a target="_blank" href="https://youtu.be/dum7q6UXiCE">video</a> on creating presentations using markdown and LaTeX beamer.
- We would like to personally thank them for all the educational resources (for suckless, it's the source code πŸ˜‚) that they have shared with the open
- souce community throughout the years… <b>πŸ™Œ Thank you! πŸ€—</b> </p>
- <hr>
-
- <?php include "includes/nav-header.php"; ?>
- <br>
-
- <h3 class="centered">πŸŽ‰ your procrastiSlides .pdf presentation has been generated successfully!!! 🍾
- </h3>
-
- <h3 class="centered">πŸ“‚ your download link is below: πŸ—ƒ
- </h3>
- <div class="centered">
+</head>
+
+<body>
+ <div class=banner>
+ <h1>πŸ“‘ procrastiSlides v0.02 🎬</h1>
+ <hr />
+ </div>
+ <p class="centered">this website is inspired from the suckless's presentation tool (<a target="_blank" href="https://tools.suckless.org/sent">sent</a>). it uses pandoc and LaTeX beamer for the backend. <br><br><b>latest feature update:</b> addition of 16:9 themes</p>
+ <hr>
+
+ <?php include "includes/nav-header.php"; ?>
+ <br>
+
+ <h3 class="centered">πŸŽ‰ your procrastiSlides .pdf presentation has been generated successfully!!! 🍾
+ </h3>
+
+ <h3 class="centered">πŸ“‚ your download link is below: πŸ—ƒ
+ </h3>
+ <div class="centered">
<?php if (isset($_POST["90sMakeUpCommercial"])) {
$_SESSION["pres"] = uniqid("pres", true) . ".md";
@@ -57,13 +56,11 @@
shell_exec($conversion);
// sleep(1);
- ?>
+ ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- <?php
+ <?php
} ?>
<?php if (isset($_POST["chicagoOlives"])) {
@@ -89,13 +86,11 @@
shell_exec($conversion);
// sleep(1);
- ?>
+ ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- <?php
+ <?php
} ?>
<?php if (isset($_POST["cleanMetropolis"])) {
@@ -121,13 +116,11 @@
shell_exec($conversion);
// sleep(1);
- ?>
+ ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- <?php
+ <?php
} ?>
<?php if (isset($_POST["ohioCustard"])) {
@@ -153,13 +146,11 @@
shell_exec($conversion);
// sleep(1);
- ?>
+ ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- <?php
+ <?php
} ?>
<?php if (isset($_POST["raleighAroundMe"])) {
@@ -185,13 +176,11 @@
shell_exec($conversion);
// sleep(1);
- ?>
+ ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- <?php
+ <?php
} ?>
<?php if (isset($_POST["earlyCupertino"])) {
@@ -217,13 +206,11 @@
shell_exec($conversion);
// sleep(1);
- ?>
+ ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- <?php
+ <?php
} ?>
@@ -250,188 +237,170 @@
shell_exec($conversion);
// sleep(1);
- ?>
+ ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- <?php
+ <?php
} ?>
- <?php if (isset($_POST["strengthInNumbers"])) {
-
- $_SESSION["pres"] = uniqid("pres", true) . ".md";
- $_SESSION["push"] = uniqid("push", true) . ".md";
- $_SESSION["convert"] = uniqid("convert", true) . ".md";
- $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ <?php if (isset($_POST["strengthInNumbers"])) {
- $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/strengthInNumbers.md output/'$push' > output/'$convert'"
- );
- shell_exec($conversion);
-
- // sleep(1);
- ?>
-
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
-
- <?php
- } ?>
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
- <?php if (isset($_POST["thatMagazine"])) {
+ $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
- $_SESSION["pres"] = uniqid("pres", true) . ".md";
- $_SESSION["push"] = uniqid("push", true) . ".md";
- $_SESSION["convert"] = uniqid("convert", true) . ".md";
- $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
+ $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";
- $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
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/strengthInNumbers.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- $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";
+ // sleep(1);
+ ?>
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec(
- "cat output/thatMagazine.md output/'$push' > output/'$convert'"
- );
- shell_exec($conversion);
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- // sleep(1);
- ?>
+ <?php
+ } ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <?php if (isset($_POST["thatMagazine"])) {
- <?php
- } ?>
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] = uniqid("procrastiSlides_", true) . ".pdf";
- <?php if (isset($_POST["cuppertinoIsh"])) {
+ $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
- $_SESSION["pres"] = uniqid("pres", true) . ".md";
- $_SESSION["push"] = uniqid("push", true) . ".md";
- $_SESSION["convert"] = uniqid("convert", true) . ".md";
- $_SESSION["filename"] =
- uniqid("procrastiSlides_", true) . ".pdf";
+ $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";
- $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
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/thatMagazine.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- $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";
+ // sleep(1);
+ ?>
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec(
- "cat output/cuppertinoIsh.md output/'$push' > output/'$convert'"
- );
- shell_exec($conversion);
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- // sleep(1);
- ?>
+ <?php
+ } ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <?php if (isset($_POST["cuppertinoIsh"])) {
- <?php
- } ?>
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] =
+ uniqid("procrastiSlides_", true) . ".pdf";
- <?php if (isset($_POST["lazyProfessor"])) {
+ $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
- $_SESSION["pres"] = uniqid("pres", true) . ".md";
- $_SESSION["push"] = uniqid("push", true) . ".md";
- $_SESSION["convert"] = uniqid("convert", true) . ".md";
- $_SESSION["filename"] =
- uniqid("procrastiSlides_", true) . ".pdf";
+ $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";
- $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
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/cuppertinoIsh.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- $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";
+ // sleep(1);
+ ?>
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec(
- "cat output/lazyProfessor.md output/'$push' > output/'$convert'"
- );
- shell_exec($conversion);
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- // sleep(1);
- ?>
+ <?php
+ } ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <?php if (isset($_POST["lazyProfessor"])) {
- <?php
- } ?>
+ $_SESSION["pres"] = uniqid("pres", true) . ".md";
+ $_SESSION["push"] = uniqid("push", true) . ".md";
+ $_SESSION["convert"] = uniqid("convert", true) . ".md";
+ $_SESSION["filename"] =
+ uniqid("procrastiSlides_", true) . ".pdf";
- <?php if (isset($_POST["redmond2003"])) {
+ $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
- $_SESSION["pres"] = uniqid("pres", true) . ".md";
- $_SESSION["push"] = uniqid("push", true) . ".md";
- $_SESSION["convert"] = uniqid("convert", true) . ".md";
- $_SESSION["filename"] =
- uniqid("procrastiSlides_", true) . ".pdf";
+ $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";
- $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
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/lazyProfessor.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
- $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";
+ // sleep(1);
+ ?>
- shell_exec("echo '$userMarkdown' > output/'$push'");
- shell_exec(
- "cat output/redmond2003.md output/'$push' > output/'$convert'"
- );
- shell_exec($conversion);
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
- // sleep(1);
- ?>
+ <?php
+ } ?>
- <h2><a href="output/<?php echo $_SESSION[
- "filename"
- ]; ?>">download presentation</a></h2>
+ <?php if (isset($_POST["redmond2003"])) {
- <?php
- } ?>
+ $_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";
- </div>
+ shell_exec("echo '$userMarkdown' > output/'$push'");
+ shell_exec(
+ "cat output/redmond2003.md output/'$push' > output/'$convert'"
+ );
+ shell_exec($conversion);
+ // sleep(1);
+ ?>
- <br><br>
- <footer>
+ <h2><a href="output/<?php echo $_SESSION["filename"]; ?>">download presentation</a></h2>
+ <?php
+ } ?>
+ </div>
+ <br><br>
+ <footer>
<?php include "includes/nav-footer.php"; ?>
+ </footer>
+</body>
- </footer>
- </body>
</html>