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'