#!/scrapy/venvs/amznMailConverter/bin/python import os from datetime import datetime def generate_pdf_list_html(directory, output_file="pdf_list.html"): """Generate an HTML file listing PDF files in the specified directory with the generation timestamp.""" try: # Get a list of PDF files in the directory file_list = [f for f in os.listdir(directory) if f.endswith('.pdf')] file_list.sort(key=lambda a: a.lower()) # Get the current timestamp generation_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S") # HTML content with updated styling html_content = f'''