Spaces:
Running
Running
I want to create an app that automatically updates the resume and the contents of the resume based on the below instructions Purpose and Goals: * Act as a 'Resume Writer' and help users format resumes, correct grammatical errors, and ensure consistent tense usage, specifically for the experience section. * Preserve the original formatting (bold, italics, etc.) of the resume. * DO NOT MISS ANY SINGLE STATEMENT * Ensure Summary statements in the resume as converted as per the rules mentioned below in the rules section * Ensure all responsibility statements for completed projects are converted to past tense. * For ongoing projects (indicated by 'Present', 'till date', 'now', 'current', etc.), ensure responsibility statements remain in simple present tense (without an 's' at the end of the verb). * Remove all personalization from the resume (e.g., "I," "my," "we," "our," etc.) without omitting any statements or changing their structure. * Maintain the original length and structure of all statements; do not shorten or lengthen them. * Ensure the first letter of each responsibility statement is capitalized. * Assist users in crafting professional and impactful resumes. * Optimize resume sections for clarity, conciseness, and effectiveness. Behaviors and Rules: 1) Initial Document Review: a) Upon receiving the resume, carefully read through the 'experience' section, paying close attention to project dates and responsibility statements. b) Identify projects with mentioned end dates (past projects - Past projects would include projects with start and end date eg: Project Start Date: September 2024 - Project End date: May 2025) and those with ongoing indicators (ongoing projects eg: Project start date: September 2024 - Project End date: indicated by 'Present', 'till date', 'now', 'current', etc.). 2) Tense Conversion Logic: a) For each responsibility statement under a past project, convert the verb to the past tense. For example, 'Develops' becomes 'Developed', 'Manages' becomes 'Managed'. b) For each responsibility statement under an ongoing project, ensure the verb is in simple present tense (without an 's' for third-person singular). For example, 'Develops' becomes 'Develop', 'Manages' becomes 'Manage'. c) Do not omit any statements or make any structural changes to the document beyond tense conversion. 3) Formatting and Personalization: a) Strictly maintain all existing formatting, including bold, italics, spacing, and bullet points. b) Scan the entire document for any personalized information (e.g., specific names, addresses, phone numbers, email addresses) and remove them, replacing with generic placeholders if necessary (e.g., '[Name]', '[Email]', '[Phone]'). 4) Summary Section Conversion: (if summary does not exist in the resume, create a summary between 500 to 700 words based on the resume, however if the summary exists then just update the summary based on the below instructions) a) Convert statements in the summary section of the resume to look like a summary of experience. b) Do not miss or omit any statement from the original input. c) Remove personalization if any. d) If the summary is in bullets format provide output in bullet format and if in paragraph format the output should be in paragraph format. e) These statements will remain the same but they should start randomly using any of the following: Skilled, familiar, well versed, proficient, hands on, mastery in, able to, capable of, experience, experienced, detail oriented, expertise, expert, great, strong experience, excellent experience, understanding of, deep understanding, demonstrated. 5) Quality Control: a) After making all necessary changes, conduct a thorough cross-check of the entire resume to ensure all tenses are correctly applied, no statements have been missed or altered in length, and all formatting is intact. b) Verify that the first letter of every responsibility statement is capitalized. c) Projects 5) Customization and Feedback: a) Offer constructive feedback on existing resume content. c) Suggest improvements for conciseness, impact, and keyword optimization. d) Maintain a conversational yet professional tone throughout the interaction. Overall Tone: * Professional, meticulous, and detail-oriented. * Helpful and precise, clearly communicating the changes made and the rationale behind them. * Focus on accuracy and adherence to instructions. Build a web-based tool that allows users to upload Microsoft Word documents (.doc or .docx formats). The tool should support the following functionalities: File Upload: Users must be able to upload one or more .doc/.docx files as input. Output Viewing Options: Display the processed or modified document content on-screen. Allow users to download the processed file in the same format (.doc or .docx). Comparison Feature: Provide a side-by-side comparison view of the original and modified documents. Clearly highlight the changes, differences, or tracked edits between the two versions. The interface should be user-friendly, supporting both document viewing and editing, while preserving Word formatting during upload and download. - Initial Deployment
Browse files- README.md +7 -5
- index.html +1047 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: resume-enhancer
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: yellow
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Professional Resume Enhancer</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/mammoth/1.4.0/mammoth.browser.min.js"></script>
|
| 9 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/docx/7.1.0/docx.js"></script>
|
| 10 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
| 11 |
+
<style>
|
| 12 |
+
.diff-insert {
|
| 13 |
+
background-color: #e6ffec;
|
| 14 |
+
text-decoration: underline;
|
| 15 |
+
}
|
| 16 |
+
.diff-delete {
|
| 17 |
+
background-color: #ffeef0;
|
| 18 |
+
text-decoration: line-through;
|
| 19 |
+
}
|
| 20 |
+
.file-upload-wrapper {
|
| 21 |
+
position: relative;
|
| 22 |
+
height: 180px;
|
| 23 |
+
border: 2px dashed #ccc;
|
| 24 |
+
border-radius: 0.5rem;
|
| 25 |
+
transition: all 0.3s ease;
|
| 26 |
+
}
|
| 27 |
+
.file-upload-wrapper:hover {
|
| 28 |
+
border-color: #4f46e5;
|
| 29 |
+
}
|
| 30 |
+
.file-upload-input {
|
| 31 |
+
width: 100%;
|
| 32 |
+
height: 100%;
|
| 33 |
+
opacity: 0;
|
| 34 |
+
position: absolute;
|
| 35 |
+
top: 0;
|
| 36 |
+
left: 0;
|
| 37 |
+
cursor: pointer;
|
| 38 |
+
}
|
| 39 |
+
.file-upload-label {
|
| 40 |
+
display: flex;
|
| 41 |
+
flex-direction: column;
|
| 42 |
+
align-items: center;
|
| 43 |
+
justify-content: center;
|
| 44 |
+
height: 100%;
|
| 45 |
+
text-align: center;
|
| 46 |
+
padding: 1rem;
|
| 47 |
+
}
|
| 48 |
+
.tab-content {
|
| 49 |
+
display: none;
|
| 50 |
+
}
|
| 51 |
+
.tab-content.active {
|
| 52 |
+
display: block;
|
| 53 |
+
}
|
| 54 |
+
.highlight-box {
|
| 55 |
+
position: relative;
|
| 56 |
+
border-radius: 0.5rem;
|
| 57 |
+
padding: 1.5rem;
|
| 58 |
+
margin-bottom: 1.5rem;
|
| 59 |
+
}
|
| 60 |
+
.highlight-box::before {
|
| 61 |
+
content: "";
|
| 62 |
+
position: absolute;
|
| 63 |
+
top: 0;
|
| 64 |
+
left: 0;
|
| 65 |
+
right: 0;
|
| 66 |
+
height: 4px;
|
| 67 |
+
border-radius: 0.5rem 0.5rem 0 0;
|
| 68 |
+
}
|
| 69 |
+
.original-box::before {
|
| 70 |
+
background-color: #ef4444;
|
| 71 |
+
}
|
| 72 |
+
.enhanced-box::before {
|
| 73 |
+
background-color: #10b981;
|
| 74 |
+
}
|
| 75 |
+
.resume-section {
|
| 76 |
+
background-color: white;
|
| 77 |
+
border-radius: 0.5rem;
|
| 78 |
+
padding: 1.5rem;
|
| 79 |
+
margin-bottom: 1.5rem;
|
| 80 |
+
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
| 81 |
+
}
|
| 82 |
+
#originalText, #enhancedText {
|
| 83 |
+
white-space: pre-wrap;
|
| 84 |
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
| 85 |
+
}
|
| 86 |
+
</style>
|
| 87 |
+
</head>
|
| 88 |
+
<body class="bg-gray-100 min-h-screen">
|
| 89 |
+
<div class="container mx-auto px-4 py-8">
|
| 90 |
+
<!-- Header -->
|
| 91 |
+
<header class="mb-10 text-center">
|
| 92 |
+
<h1 class="text-3xl md:text-4xl font-bold text-gray-800 mb-2">Professional Resume Enhancer</h1>
|
| 93 |
+
<p class="text-lg text-gray-600">Automatically improve your resume with proper tense usage, formatting, and professional summaries</p>
|
| 94 |
+
</header>
|
| 95 |
+
|
| 96 |
+
<!-- Main Content -->
|
| 97 |
+
<div class="bg-white rounded-xl shadow-lg overflow-hidden p-6 mb-8">
|
| 98 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
| 99 |
+
<!-- Upload Section -->
|
| 100 |
+
<div>
|
| 101 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">Upload Your Resume</h2>
|
| 102 |
+
<div class="file-upload-wrapper mb-6 bg-gray-50 hover:bg-gray-100" id="dropZone">
|
| 103 |
+
<input type="file" id="fileInput" class="file-upload-input" accept=".doc,.docx" multiple>
|
| 104 |
+
<label for="fileInput" class="file-upload-label">
|
| 105 |
+
<div class="w-12 h-12 mb-4 text-indigo-600">
|
| 106 |
+
<i class="fas fa-cloud-upload-alt fa-3x"></i>
|
| 107 |
+
</div>
|
| 108 |
+
<h3 class="text-lg font-medium text-gray-700 mb-1">Drag & drop your file here</h3>
|
| 109 |
+
<p class="text-sm text-gray-500">or click to browse files</p>
|
| 110 |
+
<p class="text-xs text-gray-400 mt-2">Supports .doc and .docx (Max 5MB)</p>
|
| 111 |
+
</label>
|
| 112 |
+
</div>
|
| 113 |
+
|
| 114 |
+
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-6">
|
| 115 |
+
<div class="flex items-center">
|
| 116 |
+
<div class="flex-shrink-0 text-yellow-400">
|
| 117 |
+
<i class="fas fa-info-circle"></i>
|
| 118 |
+
</div>
|
| 119 |
+
<div class="ml-3">
|
| 120 |
+
<p class="text-sm text-yellow-700">
|
| 121 |
+
The tool will automatically detect project status and adjust verb tenses accordingly, remove personal pronouns, and enhance your summary section.
|
| 122 |
+
</p>
|
| 123 |
+
</div>
|
| 124 |
+
</div>
|
| 125 |
+
</div>
|
| 126 |
+
|
| 127 |
+
<div class="mb-6">
|
| 128 |
+
<h3 class="text-md font-medium text-gray-700 mb-3">Processing Options</h3>
|
| 129 |
+
<div class="space-y-2">
|
| 130 |
+
<label class="inline-flex items-center">
|
| 131 |
+
<input type="checkbox" class="form-checkbox h-5 w-5 text-indigo-600" checked id="tenseCorrection">
|
| 132 |
+
<span class="ml-2 text-gray-700">Correct verb tenses (past/present)</span>
|
| 133 |
+
</label>
|
| 134 |
+
<label class="inline-flex items-center">
|
| 135 |
+
<input type="checkbox" class="form-checkbox h-5 w-5 text-indigo-600" checked id="personalizationRemoval">
|
| 136 |
+
<span class="ml-2 text-gray-700">Remove personal pronouns (I, my, we, etc.)</span>
|
| 137 |
+
</label>
|
| 138 |
+
<label class="inline-flex items-center">
|
| 139 |
+
<input type="checkbox" class="form-checkbox h-5 w-5 text-indigo-600" checked id="enhanceSummary">
|
| 140 |
+
<span class="ml-2 text-gray-700">Enhance summary section</span>
|
| 141 |
+
</label>
|
| 142 |
+
<label class="inline-flex items-center">
|
| 143 |
+
<input type="checkbox" class="form-checkbox h-5 w-5 text-indigo-600" checked id="formatPreservation">
|
| 144 |
+
<span class="ml-2 text-gray-700">Preserve original formatting</span>
|
| 145 |
+
</label>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
|
| 149 |
+
<button id="processBtn" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
|
| 150 |
+
<i class="fas fa-magic mr-2"></i> Enhance My Resume
|
| 151 |
+
</button>
|
| 152 |
+
</div>
|
| 153 |
+
|
| 154 |
+
<!-- How It Works Section -->
|
| 155 |
+
<div>
|
| 156 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">How It Works</h2>
|
| 157 |
+
<div class="space-y-4">
|
| 158 |
+
<div class="flex items-start">
|
| 159 |
+
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600 mr-4">
|
| 160 |
+
<i class="fas fa-upload"></i>
|
| 161 |
+
</div>
|
| 162 |
+
<div>
|
| 163 |
+
<h3 class="text-lg font-medium text-gray-800 mb-1">Upload Your Resume</h3>
|
| 164 |
+
<p class="text-gray-600">Upload your Word document (.doc or .docx) containing your current resume.</p>
|
| 165 |
+
</div>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<div class="flex items-start">
|
| 169 |
+
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600 mr-4">
|
| 170 |
+
<i class="fas fa-cog"></i>
|
| 171 |
+
</div>
|
| 172 |
+
<div>
|
| 173 |
+
<h3 class="text-lg font-medium text-gray-800 mb-1">Automatic Enhancement</h3>
|
| 174 |
+
<p class="text-gray-600">The tool will analyze your resume and make improvements while preserving your original formatting.</p>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
<div class="flex items-start">
|
| 179 |
+
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600 mr-4">
|
| 180 |
+
<i class="fas fa-check-double"></i>
|
| 181 |
+
</div>
|
| 182 |
+
<div>
|
| 183 |
+
<h3 class="text-lg font-medium text-gray-800 mb-1">Verb Tense Correction</h3>
|
| 184 |
+
<p class="text-gray-600">Past projects will use past tense verbs, while current projects will use simple present tense.</p>
|
| 185 |
+
</div>
|
| 186 |
+
</div>
|
| 187 |
+
|
| 188 |
+
<div class="flex items-start">
|
| 189 |
+
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600 mr-4">
|
| 190 |
+
<i class="fas fa-font"></i>
|
| 191 |
+
</div>
|
| 192 |
+
<div>
|
| 193 |
+
<h3 class="text-lg font-medium text-gray-800 mb-1">Summary Enhancement</h3>
|
| 194 |
+
<p class="text-gray-600">Your summary section will be professionally rewritten to start with strong action words.</p>
|
| 195 |
+
</div>
|
| 196 |
+
</div>
|
| 197 |
+
|
| 198 |
+
<div class="flex items-start">
|
| 199 |
+
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-indigo-100 flex items-center justify-center text-indigo-600 mr-4">
|
| 200 |
+
<i class="fas fa-download"></i>
|
| 201 |
+
</div>
|
| 202 |
+
<div>
|
| 203 |
+
<h3 class="text-lg font-medium text-gray-800 mb-1">Download Improved Resume</h3>
|
| 204 |
+
<p class="text-gray-600">Review the changes and download your enhanced resume in Word format.</p>
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
</div>
|
| 208 |
+
|
| 209 |
+
<div class="mt-6 bg-indigo-50 p-4 rounded-lg">
|
| 210 |
+
<h3 class="text-md font-medium text-indigo-800 mb-2">Benefits of Using This Tool</h3>
|
| 211 |
+
<ul class="list-disc list-inside text-sm text-indigo-700 space-y-1">
|
| 212 |
+
<li>Professional, consistent verb tense usage</li>
|
| 213 |
+
<li>Removal of personal pronouns for objective resumes</li>
|
| 214 |
+
<li>Enhanced summary with strong action verbs</li>
|
| 215 |
+
<li>Preservation of your original formatting</li>
|
| 216 |
+
<li>Clear comparison between original and improved versions</li>
|
| 217 |
+
</ul>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
|
| 223 |
+
<!-- Results Section (Hidden Initially) -->
|
| 224 |
+
<div id="resultsSection" class="hidden bg-white rounded-xl shadow-lg overflow-hidden p-6 mb-8">
|
| 225 |
+
<div class="flex items-center justify-between mb-6">
|
| 226 |
+
<h2 class="text-2xl font-bold text-gray-800">Enhanced Resume Results</h2>
|
| 227 |
+
<div class="flex space-x-2">
|
| 228 |
+
<button id="downloadBtn" class="bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center">
|
| 229 |
+
<i class="fas fa-file-word mr-2"></i> Download Word
|
| 230 |
+
</button>
|
| 231 |
+
<button id="downloadPdfBtn" class="bg-gray-600 hover:bg-gray-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200 flex items-center">
|
| 232 |
+
<i class="fas fa-file-pdf mr-2"></i> Download PDF
|
| 233 |
+
</button>
|
| 234 |
+
</div>
|
| 235 |
+
</div>
|
| 236 |
+
|
| 237 |
+
<!-- Tabs -->
|
| 238 |
+
<div class="mb-6 border-b border-gray-200">
|
| 239 |
+
<nav class="flex -mb-px">
|
| 240 |
+
<button id="comparisonTab" class="mr-8 py-4 px-1 border-b-2 border-indigo-500 font-medium text-sm text-indigo-600 flex items-center">
|
| 241 |
+
<i class="fas fa-columns mr-2"></i> Comparison View
|
| 242 |
+
</button>
|
| 243 |
+
<button id="enhancedTab" class="mr-8 py-4 px-1 border-b-2 border-transparent font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300 flex items-center">
|
| 244 |
+
<i class="fas fa-file-alt mr-2"></i> Enhanced Resume
|
| 245 |
+
</button>
|
| 246 |
+
<button id="originalTab" class="py-4 px-1 border-b-2 border-transparent font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300 flex items-center">
|
| 247 |
+
<i class="fas fa-file mr-2"></i> Original Resume
|
| 248 |
+
</button>
|
| 249 |
+
</nav>
|
| 250 |
+
</div>
|
| 251 |
+
|
| 252 |
+
<!-- Tab Contents -->
|
| 253 |
+
<div id="comparisonContent" class="tab-content active">
|
| 254 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
| 255 |
+
<div class="highlight-box original-box">
|
| 256 |
+
<div class="flex items-center mb-4">
|
| 257 |
+
<div class="w-3 h-3 bg-red-500 rounded-full mr-2"></div>
|
| 258 |
+
<h3 class="font-bold text-gray-800">Original Resume</h3>
|
| 259 |
+
</div>
|
| 260 |
+
<div id="originalText" class="resume-section overflow-auto max-h-screen">
|
| 261 |
+
<!-- Original content will be inserted here -->
|
| 262 |
+
</div>
|
| 263 |
+
</div>
|
| 264 |
+
<div class="highlight-box enhanced-box">
|
| 265 |
+
<div class="flex items-center mb-4">
|
| 266 |
+
<div class="w-3 h-3 bg-green-500 rounded-full mr-2"></div>
|
| 267 |
+
<h3 class="font-bold text-gray-800">Enhanced Resume</h3>
|
| 268 |
+
</div>
|
| 269 |
+
<div id="enhancedText" class="resume-section overflow-auto max-h-screen">
|
| 270 |
+
<!-- Enhanced content will be inserted here -->
|
| 271 |
+
</div>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
</div>
|
| 275 |
+
|
| 276 |
+
<div id="enhancedContent" class="tab-content">
|
| 277 |
+
<div class="highlight-box enhanced-box">
|
| 278 |
+
<div id="enhancedFullText" class="resume-section">
|
| 279 |
+
<!-- Full enhanced content will be inserted here -->
|
| 280 |
+
</div>
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
|
| 284 |
+
<div id="originalContent" class="tab-content">
|
| 285 |
+
<div class="highlight-box original-box">
|
| 286 |
+
<div id="originalFullText" class="resume-section">
|
| 287 |
+
<!-- Full original content will be inserted here -->
|
| 288 |
+
</div>
|
| 289 |
+
</div>
|
| 290 |
+
</div>
|
| 291 |
+
|
| 292 |
+
<!-- Feedback Section -->
|
| 293 |
+
<div class="mt-8 bg-blue-50 rounded-lg p-5">
|
| 294 |
+
<h3 class="text-lg font-semibold text-blue-800 mb-3 flex items-center">
|
| 295 |
+
<i class="fas fa-lightbulb mr-2"></i> Professional Feedback
|
| 296 |
+
</h3>
|
| 297 |
+
<div id="feedbackContent" class="text-blue-700 space-y-3">
|
| 298 |
+
<!-- Feedback will be inserted here -->
|
| 299 |
+
</div>
|
| 300 |
+
</div>
|
| 301 |
+
</div>
|
| 302 |
+
|
| 303 |
+
<!-- Footer -->
|
| 304 |
+
<footer class="text-center text-gray-500 text-sm mt-10">
|
| 305 |
+
<p>© 2023 Professional Resume Enhancer. All rights reserved.</p>
|
| 306 |
+
<p class="mt-1">Created with <i class="fas fa-heart text-red-500"></i> for job seekers</p>
|
| 307 |
+
</footer>
|
| 308 |
+
</div>
|
| 309 |
+
|
| 310 |
+
<script>
|
| 311 |
+
// Global variables
|
| 312 |
+
let originalContent = '';
|
| 313 |
+
let enhancedContent = '';
|
| 314 |
+
let feedback = [];
|
| 315 |
+
let fileName = '';
|
| 316 |
+
|
| 317 |
+
// DOM elements
|
| 318 |
+
const fileInput = document.getElementById('fileInput');
|
| 319 |
+
const dropZone = document.getElementById('dropZone');
|
| 320 |
+
const processBtn = document.getElementById('processBtn');
|
| 321 |
+
const resultsSection = document.getElementById('resultsSection');
|
| 322 |
+
const comparisonTab = document.getElementById('comparisonTab');
|
| 323 |
+
const enhancedTab = document.getElementById('enhancedTab');
|
| 324 |
+
const originalTab = document.getElementById('originalTab');
|
| 325 |
+
const comparisonContent = document.getElementById('comparisonContent');
|
| 326 |
+
const enhancedContent = document.getElementById('enhancedContent');
|
| 327 |
+
const originalContentEl = document.getElementById('originalContent');
|
| 328 |
+
const downloadBtn = document.getElementById('downloadBtn');
|
| 329 |
+
const downloadPdfBtn = document.getElementById('downloadPdfBtn');
|
| 330 |
+
|
| 331 |
+
// Event Listeners
|
| 332 |
+
fileInput.addEventListener('change', handleFileUpload);
|
| 333 |
+
dropZone.addEventListener('dragover', handleDragOver);
|
| 334 |
+
dropZone.addEventListener('dragleave', handleDragLeave);
|
| 335 |
+
dropZone.addEventListener('drop', handleDrop);
|
| 336 |
+
processBtn.addEventListener('click', processResume);
|
| 337 |
+
comparisonTab.addEventListener('click', () => switchTab('comparison'));
|
| 338 |
+
enhancedTab.addEventListener('click', () => switchTab('enhanced'));
|
| 339 |
+
originalTab.addEventListener('click', () => switchTab('original'));
|
| 340 |
+
downloadBtn.addEventListener('click', downloadEnhancedResume);
|
| 341 |
+
downloadPdfBtn.addEventListener('click', downloadEnhancedPdf);
|
| 342 |
+
|
| 343 |
+
// Drag and Drop handlers
|
| 344 |
+
function handleDragOver(e) {
|
| 345 |
+
e.preventDefault();
|
| 346 |
+
e.stopPropagation();
|
| 347 |
+
dropZone.classList.add('border-indigo-600', 'bg-indigo-50');
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
function handleDragLeave(e) {
|
| 351 |
+
e.preventDefault();
|
| 352 |
+
e.stopPropagation();
|
| 353 |
+
dropZone.classList.remove('border-indigo-600', 'bg-indigo-50');
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
function handleDrop(e) {
|
| 357 |
+
e.preventDefault();
|
| 358 |
+
e.stopPropagation();
|
| 359 |
+
dropZone.classList.remove('border-indigo-600', 'bg-indigo-50');
|
| 360 |
+
|
| 361 |
+
if (e.dataTransfer.files.length) {
|
| 362 |
+
fileInput.files = e.dataTransfer.files;
|
| 363 |
+
handleFileUpload();
|
| 364 |
+
}
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
// File upload handler
|
| 368 |
+
function handleFileUpload() {
|
| 369 |
+
if (fileInput.files && fileInput.files.length > 0) {
|
| 370 |
+
const file = fileInput.files[0];
|
| 371 |
+
fileName = file.name.replace(/\.[^/.]+$/, ""); // Remove extension
|
| 372 |
+
|
| 373 |
+
// Update UI to show file is ready
|
| 374 |
+
const uploadLabel = dropZone.querySelector('.file-upload-label');
|
| 375 |
+
uploadLabel.innerHTML = `
|
| 376 |
+
<div class="w-12 h-12 mb-4 text-green-500">
|
| 377 |
+
<i class="fas fa-check-circle fa-3x"></i>
|
| 378 |
+
</div>
|
| 379 |
+
<h3 class="text-lg font-medium text-gray-700 mb-1">${file.name}</h3>
|
| 380 |
+
<p class="text-sm text-gray-500">Ready to enhance</p>
|
| 381 |
+
<p class="text-xs text-gray-400 mt-2">${(file.size / 1024 / 1024).toFixed(2)} MB</p>
|
| 382 |
+
`;
|
| 383 |
+
|
| 384 |
+
processBtn.classList.remove('bg-indigo-600', 'hover:bg-indigo-700');
|
| 385 |
+
processBtn.classList.add('bg-green-600', 'hover:bg-green-700');
|
| 386 |
+
processBtn.innerHTML = '<i class="fas fa-magic mr-2"></i> Enhance My Resume';
|
| 387 |
+
}
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
// Process resume function
|
| 391 |
+
async function processResume() {
|
| 392 |
+
if (!fileInput.files || fileInput.files.length === 0) {
|
| 393 |
+
showAlert('Please upload a file first', 'error');
|
| 394 |
+
return;
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
const file = fileInput.files[0];
|
| 398 |
+
|
| 399 |
+
// Show loading state
|
| 400 |
+
processBtn.disabled = true;
|
| 401 |
+
processBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Processing...';
|
| 402 |
+
|
| 403 |
+
try {
|
| 404 |
+
// Read Word document
|
| 405 |
+
const arrayBuffer = await readFileAsArrayBuffer(file);
|
| 406 |
+
const result = await mammoth.extractRawText({arrayBuffer: arrayBuffer});
|
| 407 |
+
originalContent = result.value;
|
| 408 |
+
|
| 409 |
+
// Process content
|
| 410 |
+
enhancedContent = processResumeContent(originalContent);
|
| 411 |
+
|
| 412 |
+
// Generate feedback
|
| 413 |
+
generateFeedback();
|
| 414 |
+
|
| 415 |
+
// Display results
|
| 416 |
+
displayResults();
|
| 417 |
+
|
| 418 |
+
// Show results section
|
| 419 |
+
resultsSection.classList.remove('hidden');
|
| 420 |
+
window.scrollTo({
|
| 421 |
+
top: resultsSection.offsetTop - 20,
|
| 422 |
+
behavior: 'smooth'
|
| 423 |
+
});
|
| 424 |
+
|
| 425 |
+
// Reset button
|
| 426 |
+
processBtn.disabled = false;
|
| 427 |
+
processBtn.innerHTML = '<i class="fas fa-magic mr-2"></i> Enhance My Resume';
|
| 428 |
+
|
| 429 |
+
} catch (error) {
|
| 430 |
+
console.error('Error processing file:', error);
|
| 431 |
+
showAlert('Error processing your file. Please try again.', 'error');
|
| 432 |
+
processBtn.disabled = false;
|
| 433 |
+
processBtn.innerHTML = '<i class="fas fa-magic mr-2"></i> Try Again';
|
| 434 |
+
}
|
| 435 |
+
}
|
| 436 |
+
|
| 437 |
+
// File reader helper
|
| 438 |
+
function readFileAsArrayBuffer(file) {
|
| 439 |
+
return new Promise((resolve, reject) => {
|
| 440 |
+
const reader = new FileReader();
|
| 441 |
+
reader.onload = (e) => resolve(e.target.result);
|
| 442 |
+
reader.onerror = (e) => reject(e);
|
| 443 |
+
reader.readAsArrayBuffer(file);
|
| 444 |
+
});
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
// Main resume processing logic
|
| 448 |
+
function processResumeContent(content) {
|
| 449 |
+
feedback = [];
|
| 450 |
+
let processedContent = content;
|
| 451 |
+
|
| 452 |
+
// Check if we should process tenses
|
| 453 |
+
if (document.getElementById('tenseCorrection').checked) {
|
| 454 |
+
const tenseResult = processTenses(processedContent);
|
| 455 |
+
processedContent = tenseResult.content;
|
| 456 |
+
feedback.push(...tenseResult.feedback);
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
// Check if we should remove personalization
|
| 460 |
+
if (document.getElementById('personalizationRemoval').checked) {
|
| 461 |
+
const personalizationResult = removePersonalization(processedContent);
|
| 462 |
+
processedContent = personalizationResult.content;
|
| 463 |
+
feedback.push(...personalizationResult.feedback);
|
| 464 |
+
}
|
| 465 |
+
|
| 466 |
+
// Check if we should enhance summary
|
| 467 |
+
if (document.getElementById('enhanceSummary').checked) {
|
| 468 |
+
const summaryResult = enhanceSummarySection(processedContent);
|
| 469 |
+
processedContent = summaryResult.content;
|
| 470 |
+
feedback.push(...summaryResult.feedback);
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
return processedContent;
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
// Process verb tenses based on project dates
|
| 477 |
+
function processTenses(content) {
|
| 478 |
+
const feedback = [];
|
| 479 |
+
let processedContent = content;
|
| 480 |
+
|
| 481 |
+
// Extract experience section (assuming it's marked with "Experience" heading)
|
| 482 |
+
const experienceRegex = /(Experience|Work Experience|Professional Experience)[:\s]*(?:\r?\n)+([\s\S]*?)(?=(?:\r?\n){2,}[A-Z][a-z]+\s*:|\s*$)/i;
|
| 483 |
+
const experienceMatch = content.match(experienceRegex);
|
| 484 |
+
|
| 485 |
+
if (!experienceMatch) {
|
| 486 |
+
feedback.push({
|
| 487 |
+
type: 'warning',
|
| 488 |
+
message: 'No "Experience" section found. Verb tense correction was not applied.'
|
| 489 |
+
});
|
| 490 |
+
return { content, feedback };
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
const experienceSection = experienceMatch[2];
|
| 494 |
+
|
| 495 |
+
// Split into individual job entries (assuming each job starts with a company name and dates)
|
| 496 |
+
const jobEntries = experienceSection.split(/(?=\n[A-Z][a-zA-Z0-9&,.\- ]+\s*(?:[-–—]\s*)?(?:[A-Z][a-z]+ \d{4}|\d{4})?\s*(?:[-–—]\s*)?(?:Present|now|current|[A-Z][a-z]+ \d{4}|\d{4})\s*(?:\n|$))/);
|
| 497 |
+
|
| 498 |
+
let processedExperienceSection = '';
|
| 499 |
+
|
| 500 |
+
for (const jobEntry of jobEntries) {
|
| 501 |
+
if (!jobEntry.trim()) continue;
|
| 502 |
+
|
| 503 |
+
let processedJobEntry = jobEntry;
|
| 504 |
+
|
| 505 |
+
// Extract job dates to determine if it's current or past
|
| 506 |
+
const dateRegex = /(?:([A-Z][a-z]+ \d{4}|\d{4})\s*[-–—]\s*(Present|now|current|([A-Z][a-z]+ \d{4}|\d{4})))|(?:([A-Z][a-z]+ \d{4}|\d{4})\s*[-–—]\s*([A-Z][a-z]+ \d{4}|\d{4}))/i;
|
| 507 |
+
const dateMatch = jobEntry.match(dateRegex);
|
| 508 |
+
|
| 509 |
+
if (!dateMatch) {
|
| 510 |
+
processedExperienceSection += processedJobEntry;
|
| 511 |
+
feedback.push({
|
| 512 |
+
type: 'info',
|
| 513 |
+
message: `No dates found in job entry: "${jobEntry.split('\n')[0].trim()}". Verb tense remained unchanged.`
|
| 514 |
+
});
|
| 515 |
+
continue;
|
| 516 |
+
}
|
| 517 |
+
|
| 518 |
+
const isCurrentJob = dateMatch[2] && ['Present', 'now', 'current'].some(term => dateMatch[2].toLowerCase().includes(term.toLowerCase()));
|
| 519 |
+
|
| 520 |
+
// Split job entry into description lines (bullet points)
|
| 521 |
+
const descriptionLines = jobEntry.split('\n').filter(line => line.trim());
|
| 522 |
+
let processedLines = [];
|
| 523 |
+
|
| 524 |
+
for (let i = 0; i < descriptionLines.length; i++) {
|
| 525 |
+
let line = descriptionLines[i];
|
| 526 |
+
|
| 527 |
+
// Skip the first line (company name and dates) and any empty lines
|
| 528 |
+
if (i === 0 || !line.trim() || line.match(/^\s*(?:•|\*|-|✓|\d+\.|\w+\.)\s*/)) {
|
| 529 |
+
processedLines.push(line);
|
| 530 |
+
continue;
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
+
// Process verb tenses in this line
|
| 534 |
+
let processedLine = line;
|
| 535 |
+
|
| 536 |
+
// List of common verbs that might be at the beginning of a bullet point
|
| 537 |
+
const commonVerbs = [
|
| 538 |
+
'develop', 'design', 'implement', 'manage', 'lead', 'create', 'build',
|
| 539 |
+
'work', 'collaborate', 'analyze', 'improve', 'optimize', 'enhance',
|
| 540 |
+
'support', 'maintain', 'debug', 'test', 'document', 'deploy',
|
| 541 |
+
'research', 'investigate', 'configure', 'install', 'monitor',
|
| 542 |
+
'perform', 'provide', 'train', 'troubleshoot', 'update', 'upgrade',
|
| 543 |
+
'utilize', 'verify', 'assist', 'coordinate', 'participate', 'review'
|
| 544 |
+
];
|
| 545 |
+
|
| 546 |
+
// Create regex pattern for verbs that might need tense adjustment
|
| 547 |
+
const verbPattern = new RegExp(
|
| 548 |
+
`^(\\s*(?:•|\\*|-|✓|\\d+\\.|\\w+\\.)\\s*)?(?:[Aa]ssist(?:ed|ing|s)?)?\\s*(${commonVerbs.join('|')})([a-z]*)(\\s+)`,
|
| 549 |
+
'i'
|
| 550 |
+
);
|
| 551 |
+
|
| 552 |
+
// Check if line matches verb pattern
|
| 553 |
+
const verbMatch = line.match(verbPattern);
|
| 554 |
+
|
| 555 |
+
if (verbMatch) {
|
| 556 |
+
const bulletPoint = verbMatch[1] || '';
|
| 557 |
+
const verbRoot = verbMatch[2].toLowerCase();
|
| 558 |
+
const verbEnding = verbMatch[3];
|
| 559 |
+
const spaceAfter = verbMatch[4];
|
| 560 |
+
|
| 561 |
+
// Determine correct verb form
|
| 562 |
+
let correctedVerb;
|
| 563 |
+
if (isCurrentJob) {
|
| 564 |
+
// Current job - use simple present (without 's')
|
| 565 |
+
correctedVerb = verbRoot.charAt(0).toUpperCase() + verbRoot.slice(1);
|
| 566 |
+
} else {
|
| 567 |
+
// Past job - use past tense
|
| 568 |
+
correctedVerb = getPastTense(verbRoot);
|
| 569 |
+
}
|
| 570 |
+
|
| 571 |
+
// Rebuild the line
|
| 572 |
+
processedLine = bulletPoint + correctedVerb + spaceAfter + line.substring(verbMatch[0].length);
|
| 573 |
+
feedback.push({
|
| 574 |
+
type: 'success',
|
| 575 |
+
message: `Adjusted verb tense: "${verbRoot + verbEnding}" → "${correctedVerb}" (${isCurrentJob ? 'current' : 'past'} position)`
|
| 576 |
+
});
|
| 577 |
+
} else {
|
| 578 |
+
// No verb found at start of line
|
| 579 |
+
feedback.push({
|
| 580 |
+
type: 'info',
|
| 581 |
+
message: `No verb found at start of line: "${line.substring(0, 20)}${line.length > 20 ? '...' : ''}"`
|
| 582 |
+
});
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
// Capitalize first letter of bullet point
|
| 586 |
+
if (!processedLine.match(/^[A-Z]/)) {
|
| 587 |
+
processedLine = processedLine.charAt(0).toUpperCase() + processedLine.slice(1);
|
| 588 |
+
feedback.push({
|
| 589 |
+
type: 'info',
|
| 590 |
+
message: `Capitalized first letter of bullet point`
|
| 591 |
+
});
|
| 592 |
+
}
|
| 593 |
+
|
| 594 |
+
processedLines.push(processedLine);
|
| 595 |
+
}
|
| 596 |
+
|
| 597 |
+
processedJobEntry = processedLines.join('\n');
|
| 598 |
+
processedExperienceSection += processedJobEntry;
|
| 599 |
+
}
|
| 600 |
+
|
| 601 |
+
// Replace original experience section with processed one
|
| 602 |
+
processedContent = content.replace(experienceRegex, `$1:$2\n${processedExperienceSection}`);
|
| 603 |
+
|
| 604 |
+
return {
|
| 605 |
+
content: processedContent,
|
| 606 |
+
feedback
|
| 607 |
+
};
|
| 608 |
+
}
|
| 609 |
+
|
| 610 |
+
// Helper to get past tense of verb
|
| 611 |
+
function getPastTense(verb) {
|
| 612 |
+
// Common irregular verbs
|
| 613 |
+
const irregularVerbs = {
|
| 614 |
+
'be': 'was/were',
|
| 615 |
+
'have': 'had',
|
| 616 |
+
'do': 'did',
|
| 617 |
+
'say': 'said',
|
| 618 |
+
'go': 'went',
|
| 619 |
+
'get': 'got',
|
| 620 |
+
'make': 'made',
|
| 621 |
+
'know': 'known',
|
| 622 |
+
'take': 'took',
|
| 623 |
+
'see': 'saw',
|
| 624 |
+
'come': 'came',
|
| 625 |
+
'think': 'thought',
|
| 626 |
+
'look': 'looked',
|
| 627 |
+
'want': 'wanted',
|
| 628 |
+
'give': 'gave',
|
| 629 |
+
'use': 'used',
|
| 630 |
+
'find': 'found',
|
| 631 |
+
'tell': 'told',
|
| 632 |
+
'ask': 'asked',
|
| 633 |
+
'work': 'worked',
|
| 634 |
+
'seem': 'seemed',
|
| 635 |
+
'feel': 'felt',
|
| 636 |
+
'try': 'tried',
|
| 637 |
+
'leave': 'left',
|
| 638 |
+
'call': 'called',
|
| 639 |
+
'become': 'became',
|
| 640 |
+
'put': 'put',
|
| 641 |
+
'mean': 'meant',
|
| 642 |
+
'keep': 'kept',
|
| 643 |
+
'let': 'let',
|
| 644 |
+
'begin': 'began',
|
| 645 |
+
'seem': 'seemed',
|
| 646 |
+
'help': 'helped',
|
| 647 |
+
'show': 'showed',
|
| 648 |
+
'hear': 'heard',
|
| 649 |
+
'play': 'played',
|
| 650 |
+
'run': 'ran',
|
| 651 |
+
'move': 'moved',
|
| 652 |
+
'live': 'lived',
|
| 653 |
+
'believe': 'believed',
|
| 654 |
+
'bring': 'brought',
|
| 655 |
+
'happen': 'happened',
|
| 656 |
+
'write': 'wrote'
|
| 657 |
+
};
|
| 658 |
+
|
| 659 |
+
// Check for irregular verbs
|
| 660 |
+
const lowerVerb = verb.toLowerCase();
|
| 661 |
+
if (irregularVerbs[lowerVerb]) {
|
| 662 |
+
return irregularVerbs[lowerVerb].split('/')[0].charAt(0).toUpperCase() + irregularVerbs[lowerVerb].split('/')[0].slice(1);
|
| 663 |
+
}
|
| 664 |
+
|
| 665 |
+
// Regular verb patterns
|
| 666 |
+
if (verb.endsWith('e')) {
|
| 667 |
+
return verb + 'd';
|
| 668 |
+
} else if (verb.endsWith('y') && !['a', 'e', 'i', 'o', 'u'].includes(verb.charAt(verb.length - 2))) {
|
| 669 |
+
return verb.substring(0, verb.length - 1) + 'ied';
|
| 670 |
+
} else if (verb.match(/[^aeiou][aeiou][^aeiour]$/)) {
|
| 671 |
+
// Single vowel followed by single consonant (except w, x, y)
|
| 672 |
+
return verb + verb.charAt(verb.length - 1) + 'ed';
|
| 673 |
+
} else {
|
| 674 |
+
return verb + 'ed';
|
| 675 |
+
}
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
// Remove personal pronouns
|
| 679 |
+
function removePersonalization(content) {
|
| 680 |
+
const feedback = [];
|
| 681 |
+
let processedContent = content;
|
| 682 |
+
|
| 683 |
+
// Pattern to match personal pronouns and possessive adjectives
|
| 684 |
+
const personalPattern = /\b(I|my|me|mine|we|our|ours|us)\b/gi;
|
| 685 |
+
|
| 686 |
+
// Check if content contains personal pronouns
|
| 687 |
+
if (content.match(personalPattern)) {
|
| 688 |
+
// Remove personal pronouns
|
| 689 |
+
processedContent = content.replace(personalPattern, '');
|
| 690 |
+
|
| 691 |
+
// Add feedback about which pronouns were found
|
| 692 |
+
const foundPronouns = [...new Set(content.match(personalPattern).map(p => p.toLowerCase()))];
|
| 693 |
+
feedback.push({
|
| 694 |
+
type: 'success',
|
| 695 |
+
message: `Removed personal pronouns: ${foundPronouns.join(', ')}`
|
| 696 |
+
});
|
| 697 |
+
|
| 698 |
+
// Additional pass to clean up any resulting double spaces
|
| 699 |
+
processedContent = processedContent.replace(/\s\s+/g, ' ');
|
| 700 |
+
} else {
|
| 701 |
+
feedback.push({
|
| 702 |
+
type: 'info',
|
| 703 |
+
message: 'No personal pronouns found. This section was not modified.'
|
| 704 |
+
});
|
| 705 |
+
}
|
| 706 |
+
|
| 707 |
+
return {
|
| 708 |
+
content: processedContent,
|
| 709 |
+
feedback
|
| 710 |
+
};
|
| 711 |
+
}
|
| 712 |
+
|
| 713 |
+
// Enhance summary section
|
| 714 |
+
function enhanceSummarySection(content) {
|
| 715 |
+
const feedback = [];
|
| 716 |
+
let processedContent = content;
|
| 717 |
+
|
| 718 |
+
// Check if summary section exists
|
| 719 |
+
const summaryRegex = /(Summary|Professional Summary|Profile)[:\s]*(?:\r?\n)+([\s\S]*?)(?=(?:\r?\n){2,}[A-Z][a-z]+\s*:|\s*$)/i;
|
| 720 |
+
const summaryMatch = content.match(summaryRegex);
|
| 721 |
+
|
| 722 |
+
if (!summaryMatch) {
|
| 723 |
+
// Create a summary section if it doesn't exist
|
| 724 |
+
const createdSummary = createSummaryFromContent(content);
|
| 725 |
+
processedContent = `Professional Summary\n\n${createdSummary.content}\n\n${content}`;
|
| 726 |
+
feedback.push(...createdSummary.feedback);
|
| 727 |
+
feedback.push({
|
| 728 |
+
type: 'success',
|
| 729 |
+
message: 'Created a professional summary section based on your resume content'
|
| 730 |
+
});
|
| 731 |
+
} else {
|
| 732 |
+
// Extract and enhance existing summary
|
| 733 |
+
const originalSummary = summaryMatch[2];
|
| 734 |
+
const enhancedSummary = enhanceExistingSummary(originalSummary);
|
| 735 |
+
processedContent = content.replace(summaryRegex, `$1:\n\n${enhancedSummary.content}`);
|
| 736 |
+
feedback.push(...enhancedSummary.feedback);
|
| 737 |
+
}
|
| 738 |
+
|
| 739 |
+
return {
|
| 740 |
+
content: processedContent,
|
| 741 |
+
feedback
|
| 742 |
+
};
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
// Enhance existing summary section
|
| 746 |
+
function enhanceExistingSummary(summary) {
|
| 747 |
+
const feedback = [];
|
| 748 |
+
const actionVerbs = [
|
| 749 |
+
'Skilled', 'Familiar', 'Well versed', 'Proficient', 'Hands on', 'Mastery in',
|
| 750 |
+
'Able to', 'Capable of', 'Experience', 'Experienced', 'Detail oriented',
|
| 751 |
+
'Expertise', 'Expert', 'Great', 'Strong experience', 'Excellent experience',
|
| 752 |
+
'Understanding of', 'Deep understanding', 'Demonstrated'
|
| 753 |
+
];
|
| 754 |
+
|
| 755 |
+
// Split into sentences or bullet points
|
| 756 |
+
const isBulletFormat = summary.includes('•') || summary.includes('*') || summary.includes('-');
|
| 757 |
+
let summaryParts = isBulletFormat ?
|
| 758 |
+
summary.split(/(?:\r?\n)*(?:•|\*|-)\s*/).filter(part => part.trim()) :
|
| 759 |
+
summary.split(/(?:\r?\n)+(?!\s)/).filter(part => part.trim());
|
| 760 |
+
|
| 761 |
+
let enhancedParts = [];
|
| 762 |
+
|
| 763 |
+
for (const part of summaryParts) {
|
| 764 |
+
let enhancedPart = part;
|
| 765 |
+
|
| 766 |
+
// Randomly select an action verb
|
| 767 |
+
const randomVerb = actionVerbs[Math.floor(Math.random() * actionVerbs.length)];
|
| 768 |
+
|
| 769 |
+
// If it's the first part, ensure it's capitalized
|
| 770 |
+
if (!enhancedPart.match(/^[A-Z]/)) {
|
| 771 |
+
enhancedPart = enhancedPart.charAt(0).toUpperCase() + enhancedPart.slice(1);
|
| 772 |
+
}
|
| 773 |
+
|
| 774 |
+
// Remove any personal pronouns if they exist
|
| 775 |
+
enhancedPart = enhancedPart.replace(/\b(I|my|me|mine|we|our|ours|us)\b/gi, '');
|
| 776 |
+
|
| 777 |
+
// Start with the random action verb if it's not already starting with one
|
| 778 |
+
if (!actionVerbs.some(verb => enhancedPart.startsWith(verb))) {
|
| 779 |
+
enhancedPart = `${randomVerb} ${enhancedPart.toLowerCase()}`;
|
| 780 |
+
}
|
| 781 |
+
|
| 782 |
+
// Capitalize first letter
|
| 783 |
+
enhancedPart = enhancedPart.charAt(0).toUpperCase() + enhancedPart.slice(1);
|
| 784 |
+
|
| 785 |
+
enhancedParts.push(enhancedPart);
|
| 786 |
+
feedback.push({
|
| 787 |
+
type: 'success',
|
| 788 |
+
message: `Enhanced summary statement: "${part.substring(0, 30)}${part.length > 30 ? '...' : ''}" with action verb`
|
| 789 |
+
});
|
| 790 |
+
}
|
| 791 |
+
|
| 792 |
+
// Rebuild summary in original format
|
| 793 |
+
let enhancedSummary;
|
| 794 |
+
if (isBulletFormat) {
|
| 795 |
+
enhancedSummary = enhancedParts.map(part => `• ${part}`).join('\n');
|
| 796 |
+
} else {
|
| 797 |
+
enhancedSummary = enhancedParts.join('\n\n');
|
| 798 |
+
}
|
| 799 |
+
|
| 800 |
+
return {
|
| 801 |
+
content: enhancedSummary,
|
| 802 |
+
feedback
|
| 803 |
+
};
|
| 804 |
+
}
|
| 805 |
+
|
| 806 |
+
// Create summary from content if it doesn't exist
|
| 807 |
+
function createSummaryFromContent(content) {
|
| 808 |
+
const feedback = [];
|
| 809 |
+
const keySkills = extractKeySkills(content);
|
| 810 |
+
|
| 811 |
+
// Generate summary based on extracted skills and experience
|
| 812 |
+
const summaryPoints = [
|
| 813 |
+
`Experienced professional with expertise in ${keySkills.length > 0 ? keySkills.slice(0, 3).join(', ') : 'key technical and functional areas'}.`,
|
| 814 |
+
`Demonstrated success in ${keySkills.length > 1 ? keySkills[1] : 'delivering projects'} and ${keySkills.length > 2 ? keySkills[2] : 'solving complex problems'}.`,
|
| 815 |
+
`Skilled in ${keySkills.length > 3 ? keySkills[3] : 'cross-functional collaboration'} and ${keySkills.length > 4 ? keySkills[4] : 'process improvement'}.`,
|
| 816 |
+
`Detail-oriented with strong analytical abilities and a focus on ${keySkills.length > 5 ? keySkills[5] : 'quality and efficiency'}.`
|
| 817 |
+
];
|
| 818 |
+
|
| 819 |
+
feedback.push({
|
| 820 |
+
type: 'info',
|
| 821 |
+
message: `Created summary based on identified skills: ${keySkills.join(', ')}`
|
| 822 |
+
});
|
| 823 |
+
|
| 824 |
+
return {
|
| 825 |
+
content: summaryPoints.join(' '),
|
| 826 |
+
feedback
|
| 827 |
+
};
|
| 828 |
+
}
|
| 829 |
+
|
| 830 |
+
// Extract key skills from resume content
|
| 831 |
+
function extractKeySkills(content) {
|
| 832 |
+
// Common technical skills
|
| 833 |
+
const commonTechnicalSkills = [
|
| 834 |
+
'software development', 'web applications', 'database management',
|
| 835 |
+
'cloud computing', 'agile methodologies', 'project management',
|
| 836 |
+
'data analysis', 'machine learning', 'UI/UX design', 'quality assurance',
|
| 837 |
+
'DevOps', 'cybersecurity', 'networking', 'system architecture'
|
| 838 |
+
];
|
| 839 |
+
|
| 840 |
+
// Common soft skills
|
| 841 |
+
const commonSoftSkills = [
|
| 842 |
+
'team leadership', 'communication', 'problem solving', 'critical thinking',
|
| 843 |
+
'time management', 'collaboration', 'adaptability', 'creativity'
|
| 844 |
+
];
|
| 845 |
+
|
| 846 |
+
// Merge all common skills
|
| 847 |
+
const allCommonSkills = [...commonTechnicalSkills, ...commonSoftSkills];
|
| 848 |
+
|
| 849 |
+
// Find skills mentioned in the resume
|
| 850 |
+
const mentionedSkills = allCommonSkills.filter(skill =>
|
| 851 |
+
content.toLowerCase().includes(skill.toLowerCase())
|
| 852 |
+
);
|
| 853 |
+
|
| 854 |
+
// If few or no common skills found, use more generic terms
|
| 855 |
+
if (mentionedSkills.length < 3) {
|
| 856 |
+
return [
|
| 857 |
+
...mentionedSkills,
|
| 858 |
+
'technical problem solving',
|
| 859 |
+
'strategic planning',
|
| 860 |
+
'process optimization',
|
| 861 |
+
'stakeholder management'
|
| 862 |
+
].slice(0, 6);
|
| 863 |
+
}
|
| 864 |
+
|
| 865 |
+
return mentionedSkills;
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
// Generate professional feedback
|
| 869 |
+
function generateFeedback() {
|
| 870 |
+
const feedbackEl = document.getElementById('feedbackContent');
|
| 871 |
+
feedbackEl.innerHTML = '';
|
| 872 |
+
|
| 873 |
+
// Add overall feedback
|
| 874 |
+
const overallFeedback = document.createElement('div');
|
| 875 |
+
overallFeedback.className = 'bg-indigo-100 p-3 rounded-lg mb-4';
|
| 876 |
+
overallFeedback.innerHTML = `
|
| 877 |
+
<h4 class="font-semibold text-indigo-800 flex items-center">
|
| 878 |
+
<i class="fas fa-star mr-2"></i> Overall Resume Analysis
|
| 879 |
+
</h4>
|
| 880 |
+
<p class="mt-2 text-indigo-700">Your resume has been enhanced with professional verb usage, proper tense application, and an optimized summary section. Below are the specific improvements made:</p>
|
| 881 |
+
`;
|
| 882 |
+
feedbackEl.appendChild(overallFeedback);
|
| 883 |
+
|
| 884 |
+
// Add individual feedback items
|
| 885 |
+
feedback.forEach(item => {
|
| 886 |
+
const feedbackItem = document.createElement('div');
|
| 887 |
+
feedbackItem.className = `mt-3 p-3 rounded-lg flex items-start ${item.type === 'error' ? 'bg-red-100 text-red-800' : item.type === 'warning' ? 'bg-yellow-100 text-yellow-800' : item.type === 'success' ? 'bg-green-100 text-green-800' : 'bg-blue-100 text-blue-800'}`;
|
| 888 |
+
|
| 889 |
+
const icon = item.type === 'error' ? 'exclamation-triangle' :
|
| 890 |
+
item.type === 'warning' ? 'exclamation-circle' :
|
| 891 |
+
item.type === 'success' ? 'check-circle' : 'info-circle';
|
| 892 |
+
|
| 893 |
+
feedbackItem.innerHTML = `
|
| 894 |
+
<i class="fas fa-${icon} mr-2 mt-1"></i>
|
| 895 |
+
<span>${item.message}</span>
|
| 896 |
+
`;
|
| 897 |
+
feedbackEl.appendChild(feedbackItem);
|
| 898 |
+
});
|
| 899 |
+
|
| 900 |
+
// Add action items
|
| 901 |
+
const actionItems = document.createElement('div');
|
| 902 |
+
actionItems.className = 'bg-purple-100 p-3 rounded-lg mt-4';
|
| 903 |
+
actionItems.innerHTML = `
|
| 904 |
+
<h4 class="font-semibold text-purple-800 flex items-center">
|
| 905 |
+
<i class="fas fa-check-double mr-2"></i> Suggested Next Steps
|
| 906 |
+
</h4>
|
| 907 |
+
<ul class="mt-2 pl-5 list-disc text-purple-700 space-y-1">
|
| 908 |
+
<li>Review the highlighted changes to ensure they accurately reflect your experience</li>
|
| 909 |
+
<li>Tailor the summary section further to match specific job requirements</li>
|
| 910 |
+
<li>Consider adding metrics or quantifiable achievements where possible</li>
|
| 911 |
+
<li>Download the enhanced version and save it for future applications</li>
|
| 912 |
+
</ul>
|
| 913 |
+
`;
|
| 914 |
+
feedbackEl.appendChild(actionItems);
|
| 915 |
+
}
|
| 916 |
+
|
| 917 |
+
// Display results in comparison view
|
| 918 |
+
function displayResults() {
|
| 919 |
+
document.getElementById('originalText').textContent = originalContent;
|
| 920 |
+
document.getElementById('enhancedText').innerHTML = highlightDifferences(originalContent, enhancedContent);
|
| 921 |
+
document.getElementById('originalFullText').textContent = originalContent;
|
| 922 |
+
document.getElementById('enhancedFullText').textContent = enhancedContent;
|
| 923 |
+
|
| 924 |
+
// Set first tab as active
|
| 925 |
+
switchTab('comparison');
|
| 926 |
+
}
|
| 927 |
+
|
| 928 |
+
// Highlight differences between original and enhanced content
|
| 929 |
+
function highlightDifferences(original, enhanced) {
|
| 930 |
+
// This is a simplified diff implementation
|
| 931 |
+
// In a real app, you'd want to use a proper diff algorithm
|
| 932 |
+
let result = '';
|
| 933 |
+
const originalLines = original.split('\n');
|
| 934 |
+
const enhancedLines = enhanced.split('\n');
|
| 935 |
+
|
| 936 |
+
for (let i = 0; i < enhancedLines.length; i++) {
|
| 937 |
+
if (i < originalLines.length && originalLines[i] !== enhancedLines[i]) {
|
| 938 |
+
// Changed line
|
| 939 |
+
result += `<span class="diff-insert">${enhancedLines[i]}</span>`;
|
| 940 |
+
} else if (i >= originalLines.length) {
|
| 941 |
+
// New line
|
| 942 |
+
result += `<span class="diff-insert">${enhancedLines[i]}</span>`;
|
| 943 |
+
} else {
|
| 944 |
+
// Unchanged line
|
| 945 |
+
result += enhancedLines[i];
|
| 946 |
+
}
|
| 947 |
+
result += '\n';
|
| 948 |
+
}
|
| 949 |
+
|
| 950 |
+
return result;
|
| 951 |
+
}
|
| 952 |
+
|
| 953 |
+
// Switch between tabs
|
| 954 |
+
function switchTab(tab) {
|
| 955 |
+
// Update tab styles
|
| 956 |
+
comparisonTab.classList.remove('border-indigo-500', 'text-indigo-600');
|
| 957 |
+
comparisonTab.classList.add('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
|
| 958 |
+
enhancedTab.classList.remove('border-indigo-500', 'text-indigo-600');
|
| 959 |
+
enhancedTab.classList.add('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
|
| 960 |
+
originalTab.classList.remove('border-indigo-500', 'text-indigo-600');
|
| 961 |
+
originalTab.classList.add('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
|
| 962 |
+
|
| 963 |
+
// Hide all content
|
| 964 |
+
comparisonContent.classList.remove('active');
|
| 965 |
+
enhancedContent.classList.remove('active');
|
| 966 |
+
originalContentEl.classList.remove('active');
|
| 967 |
+
|
| 968 |
+
// Show selected content and update tab style
|
| 969 |
+
if (tab === 'comparison') {
|
| 970 |
+
comparisonContent.classList.add('active');
|
| 971 |
+
comparisonTab.classList.add('border-indigo-500', 'text-indigo-600');
|
| 972 |
+
comparisonTab.classList.remove('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
|
| 973 |
+
} else if (tab === 'enhanced') {
|
| 974 |
+
enhancedContent.classList.add('active');
|
| 975 |
+
enhancedTab.classList.add('border-indigo-500', 'text-indigo-600');
|
| 976 |
+
enhancedTab.classList.remove('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
|
| 977 |
+
} else {
|
| 978 |
+
originalContentEl.classList.add('active');
|
| 979 |
+
originalTab.classList.add('border-indigo-500', 'text-indigo-600');
|
| 980 |
+
originalTab.classList.remove('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');
|
| 981 |
+
}
|
| 982 |
+
}
|
| 983 |
+
|
| 984 |
+
// Download enhanced resume as Word
|
| 985 |
+
async function downloadEnhancedResume() {
|
| 986 |
+
if (!enhancedContent) {
|
| 987 |
+
showAlert('No enhanced content to download', 'error');
|
| 988 |
+
return;
|
| 989 |
+
}
|
| 990 |
+
|
| 991 |
+
try {
|
| 992 |
+
// In a real implementation, you would use a library like docx.js to create a Word document
|
| 993 |
+
// Here we'll simulate it with a text file download for demonstration
|
| 994 |
+
|
| 995 |
+
const blob = new Blob([enhancedContent], { type: 'text/plain' });
|
| 996 |
+
const url = URL.createObjectURL(blob);
|
| 997 |
+
const a = document.createElement('a');
|
| 998 |
+
a.href = url;
|
| 999 |
+
a.download = `${fileName || 'enhanced_resume'}_enhanced.docx`;
|
| 1000 |
+
document.body.appendChild(a);
|
| 1001 |
+
a.click();
|
| 1002 |
+
document.body.removeChild(a);
|
| 1003 |
+
URL.revokeObjectURL(url);
|
| 1004 |
+
|
| 1005 |
+
showAlert('Download started successfully', 'success');
|
| 1006 |
+
} catch (error) {
|
| 1007 |
+
console.error('Error generating Word document:', error);
|
| 1008 |
+
showAlert('Error generating Word document', 'error');
|
| 1009 |
+
}
|
| 1010 |
+
}
|
| 1011 |
+
|
| 1012 |
+
// Download enhanced resume as PDF (simulated)
|
| 1013 |
+
function downloadEnhancedPdf() {
|
| 1014 |
+
if (!enhancedContent) {
|
| 1015 |
+
showAlert('No enhanced content to download', 'error');
|
| 1016 |
+
return;
|
| 1017 |
+
}
|
| 1018 |
+
|
| 1019 |
+
showAlert('PDF generation would require additional server-side processing. The enhanced content is ready for you to copy.', 'info');
|
| 1020 |
+
}
|
| 1021 |
+
|
| 1022 |
+
// Show alert message
|
| 1023 |
+
function showAlert(message, type) {
|
| 1024 |
+
const alert = document.createElement('div');
|
| 1025 |
+
alert.className = `fixed top-4 right-4 p-4 rounded-lg shadow-lg text-white font-medium flex items-center ${type === 'error' ? 'bg-red-500' : type === 'success' ? 'bg-green-500' : 'bg-blue-500'}`;
|
| 1026 |
+
|
| 1027 |
+
const icon = type === 'error' ? 'exclamation-triangle' :
|
| 1028 |
+
type === 'success' ? 'check-circle' : 'info-circle';
|
| 1029 |
+
|
| 1030 |
+
alert.innerHTML = `
|
| 1031 |
+
<i class="fas fa-${icon} mr-2"></i>
|
| 1032 |
+
<span>${message}</span>
|
| 1033 |
+
<button class="ml-4" onclick="this.parentElement.remove()">
|
| 1034 |
+
<i class="fas fa-times"></i>
|
| 1035 |
+
</button>
|
| 1036 |
+
`;
|
| 1037 |
+
|
| 1038 |
+
document.body.appendChild(alert);
|
| 1039 |
+
|
| 1040 |
+
// Auto-hide after 5 seconds
|
| 1041 |
+
setTimeout(() => {
|
| 1042 |
+
alert.remove();
|
| 1043 |
+
}, 5000);
|
| 1044 |
+
}
|
| 1045 |
+
</script>
|
| 1046 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Ron17/resume-enhancer" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1047 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
I want to create an app that automatically updates the resume and the contents of the resume based on the below instructions Purpose and Goals: * Act as a 'Resume Writer' and help users format resumes, correct grammatical errors, and ensure consistent tense usage, specifically for the experience section. * Preserve the original formatting (bold, italics, etc.) of the resume. * DO NOT MISS ANY SINGLE STATEMENT * Ensure Summary statements in the resume as converted as per the rules mentioned below in the rules section * Ensure all responsibility statements for completed projects are converted to past tense. * For ongoing projects (indicated by 'Present', 'till date', 'now', 'current', etc.), ensure responsibility statements remain in simple present tense (without an 's' at the end of the verb). * Remove all personalization from the resume (e.g., "I," "my," "we," "our," etc.) without omitting any statements or changing their structure. * Maintain the original length and structure of all statements; do not shorten or lengthen them. * Ensure the first letter of each responsibility statement is capitalized. * Assist users in crafting professional and impactful resumes. * Optimize resume sections for clarity, conciseness, and effectiveness. Behaviors and Rules: 1) Initial Document Review: a) Upon receiving the resume, carefully read through the 'experience' section, paying close attention to project dates and responsibility statements. b) Identify projects with mentioned end dates (past projects - Past projects would include projects with start and end date eg: Project Start Date: September 2024 - Project End date: May 2025) and those with ongoing indicators (ongoing projects eg: Project start date: September 2024 - Project End date: indicated by 'Present', 'till date', 'now', 'current', etc.). 2) Tense Conversion Logic: a) For each responsibility statement under a past project, convert the verb to the past tense. For example, 'Develops' becomes 'Developed', 'Manages' becomes 'Managed'. b) For each responsibility statement under an ongoing project, ensure the verb is in simple present tense (without an 's' for third-person singular). For example, 'Develops' becomes 'Develop', 'Manages' becomes 'Manage'. c) Do not omit any statements or make any structural changes to the document beyond tense conversion. 3) Formatting and Personalization: a) Strictly maintain all existing formatting, including bold, italics, spacing, and bullet points. b) Scan the entire document for any personalized information (e.g., specific names, addresses, phone numbers, email addresses) and remove them, replacing with generic placeholders if necessary (e.g., '[Name]', '[Email]', '[Phone]'). 4) Summary Section Conversion: (if summary does not exist in the resume, create a summary between 500 to 700 words based on the resume, however if the summary exists then just update the summary based on the below instructions) a) Convert statements in the summary section of the resume to look like a summary of experience. b) Do not miss or omit any statement from the original input. c) Remove personalization if any. d) If the summary is in bullets format provide output in bullet format and if in paragraph format the output should be in paragraph format. e) These statements will remain the same but they should start randomly using any of the following: Skilled, familiar, well versed, proficient, hands on, mastery in, able to, capable of, experience, experienced, detail oriented, expertise, expert, great, strong experience, excellent experience, understanding of, deep understanding, demonstrated. 5) Quality Control: a) After making all necessary changes, conduct a thorough cross-check of the entire resume to ensure all tenses are correctly applied, no statements have been missed or altered in length, and all formatting is intact. b) Verify that the first letter of every responsibility statement is capitalized. c) Projects 5) Customization and Feedback: a) Offer constructive feedback on existing resume content. c) Suggest improvements for conciseness, impact, and keyword optimization. d) Maintain a conversational yet professional tone throughout the interaction. Overall Tone: * Professional, meticulous, and detail-oriented. * Helpful and precise, clearly communicating the changes made and the rationale behind them. * Focus on accuracy and adherence to instructions. Build a web-based tool that allows users to upload Microsoft Word documents (.doc or .docx formats). The tool should support the following functionalities: File Upload: Users must be able to upload one or more .doc/.docx files as input. Output Viewing Options: Display the processed or modified document content on-screen. Allow users to download the processed file in the same format (.doc or .docx). Comparison Feature: Provide a side-by-side comparison view of the original and modified documents. Clearly highlight the changes, differences, or tracked edits between the two versions. The interface should be user-friendly, supporting both document viewing and editing, while preserving Word formatting during upload and download.
|