From f45d60abbaed15485cc9c69531ae553787b4557f Mon Sep 17 00:00:00 2001 From: Miguel Almodovar Date: Mon, 22 Jan 2024 17:20:48 -0400 Subject: [PATCH] practicing my git flow --- app.py | 23 +++++++++-------------- index.html | 27 +-------------------------- nsecbunkerd | 1 - 3 files changed, 10 insertions(+), 41 deletions(-) delete mode 160000 nsecbunkerd diff --git a/app.py b/app.py index f4e0844..881313f 100644 --- a/app.py +++ b/app.py @@ -4,7 +4,7 @@ import os # Initialize Flask app app = Flask(__name__) -# Directory containing EPUB files +# Directory containing resumes RESUME_DIR = './resumes/' @app.route('/') @@ -17,26 +17,21 @@ def search(): # Get the search query parameter and convert it to lowercase for case-insensitive matching query = request.args.get('searchQuery', '').lower() - # List to store filenames of matching EPUB files + # List to store filenames of matching PDF files matching_files = [] - # Fetch all EPUB files from the directory and filter them based on the search query - all_files = [f for f in os.listdir(RESUME_DIR) if f.lower().endswith('.epub')] + # Fetch all resumes from the directory and filter them based on the search query + all_files = [f for f in os.listdir(RESUME_DIR) if f.lower().endswith('.pdf')] matching_files += [f for f in all_files if query in f.lower()] # Generate HTML for the list of matching files - results_html = "".join([f'
  • {file}
  • ' for file in matching_files]) + results_html = "".join([f'
  • {file}
  • ' for file in matching_files]) return results_html -@app.route('/bookshelf/') -def serve_epub(filename): - # Serve an EPUB file from the bookshelf directory - return send_from_directory(EPUBS_DIR, filename) - -@app.route('/reader/') -def serve_bibi_assets(subpath): - # Serve assets for the Bibi EPUB reader (JavaScript, CSS, etc.) - return send_from_directory('./reader', subpath) +@app.route('/resumes/') +def serve_resume(filename): + # Serve a resume from the resumes directory + return send_from_directory(RESUME_DIR, filename) @app.route('/favicon.ico') def favicon(): diff --git a/index.html b/index.html index 3ed6173..b23ee5a 100644 --- a/index.html +++ b/index.html @@ -15,8 +15,6 @@ - - @@ -55,17 +53,7 @@ - - - -
    - - - - - - +
    @@ -90,19 +78,6 @@
    -
    diff --git a/nsecbunkerd b/nsecbunkerd deleted file mode 160000 index c7a4c12..0000000 --- a/nsecbunkerd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c7a4c12a0a903ed1109f177f228a6c23e62abe45