diff --git a/README.md b/README.md index 4fe0ee1..8d69b84 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -# hackriceproject -This is our Hackrice project -## Setup -`python3 -m venv venv` -`source venv/bin/activate` -`pip install -r requirements.txt` -restart so bootstrap-flask loads - -`export FLASK_APP=flaskr` -`export FLASK_ENV=development` -`flask run` +# EZ PowerPoint + + + +## Local Instructions +1. `python3 -m venv venv` +1. `source venv/bin/activate` +1. `pip install -r requirements.txt` +1. restart so bootstrap-flask loads + +1. `export FLASK_APP=flaskr` +1. `export FLASK_ENV=development` +1. `flask run` diff --git a/flaskr/doc_analyzer.py b/flaskr/doc_analyzer.py index 9ba8c33..8eafb8d 100644 --- a/flaskr/doc_analyzer.py +++ b/flaskr/doc_analyzer.py @@ -53,11 +53,3 @@ def find_title(heading_text): word_frequencies[word] += 1 max_freq = max(word_frequencies.values()) return (list(word_frequencies.keys())[list(word_frequencies.values()).index(max_freq)]) - - - - - - - - diff --git a/flaskr/static/download.js b/flaskr/static/download.js index 95452c8..83a18d1 100644 --- a/flaskr/static/download.js +++ b/flaskr/static/download.js @@ -1,19 +1,10 @@ document.addEventListener('DOMContentLoaded', function() { - setTimeout(changeDisplay, 5000); + setTimeout(displaySuccess, 750); }); -function changeDisplay() { - { - displaySuccess() - } - - - function displaySuccess() { document.getElementById("loading").style.display = "none"; document.getElementById("success").style.display = "block"; document.getElementById("downloadBtn").style.display = "inline"; document.getElementById("pptx-status").innerHTML = "All done, click below to get your powerpoint!" } - -} diff --git a/flaskr/static/style.css b/flaskr/static/style.css index 8b30226..2eb0b95 100644 --- a/flaskr/static/style.css +++ b/flaskr/static/style.css @@ -104,7 +104,7 @@ button { .center { margin-left: auto; margin-right: auto; - width: 50%; + width: 60%; } #theme { diff --git a/flaskr/static/upload.js b/flaskr/static/upload.js index f405555..a20864d 100644 --- a/flaskr/static/upload.js +++ b/flaskr/static/upload.js @@ -1,10 +1,7 @@ var fileBool = false; var themeBool = false; var acceptedFileTypes = [ - "application/doc", - "application/ms-doc", - "application/msword", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", ] function updateGenerateBtn() { @@ -59,10 +56,10 @@ document.querySelectorAll(".drop-zone__input").forEach((inputElement) => { updateThumbnail(dropZoneElement, file); fileBool = true; updateGenerateBtn(); } else { - alert("FileType must be .doc or .docx"); + alert("Please upload a .docx extension"); } } else { - alert("You can only upload one file!"); + alert("Please upload a single file"); } dropZoneElement.classList.remove("drop-zone--over"); diff --git a/flaskr/templates/download.html b/flaskr/templates/download.html index 02d569f..68cdec5 100644 --- a/flaskr/templates/download.html +++ b/flaskr/templates/download.html @@ -38,12 +38,12 @@
Tired of making powerpoints and losing hours that could be put into deep work? You've come to the right place. EZ PowerPoint uses natural language processing algorithms to - pick out the most important points and summarizes the report or paper. Simply upload your files, click generate, and wait for your work - to be done for you! + pick out the most important points and summarizes the report or paper. Simply upload your file, + choose a theme, click generate, and wait for your work to be done for you!