michael-agent 1.0.2__py3-none-any.whl → 1.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,411 @@
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>Upload Resumes - SmartRecruitAgent</title>
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
8
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
9
+ <link rel="stylesheet" href="/static/styles.css">
10
+ </head>
11
+ <body>
12
+ <header class="bg-dark text-white p-3">
13
+ <div class="container">
14
+ <div class="d-flex justify-content-between align-items-center">
15
+ <h1 class="h3 mb-0">SmartRecruitAgent - Resume Upload</h1>
16
+ <div>
17
+ <a href="/career-portal" class="btn btn-outline-light me-2">Career Portal</a>
18
+ <a href="/" class="btn btn-outline-light">Dashboard</a>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ </header>
23
+
24
+ <div class="container mt-4">
25
+ <div class="row">
26
+ <div class="col-md-8 mx-auto">
27
+ <div class="card mb-4">
28
+ <div class="card-header bg-primary text-white">
29
+ Upload Resumes
30
+ </div>
31
+ <div class="card-body">
32
+ <form id="resume-upload-form">
33
+ <div class="mb-4">
34
+ <label for="job-select" class="form-label">Select Target Job Position*</label>
35
+ <select class="form-select" id="job-select" name="job_id" required>
36
+ <option value="" selected>Loading jobs...</option>
37
+ </select>
38
+ <div class="form-text">Choose the job position these resumes are for</div>
39
+ </div>
40
+
41
+ <div class="mb-4">
42
+ <label class="form-label">Upload Resume Files*</label>
43
+ <div class="upload-area p-4 border rounded text-center" id="drop-area">
44
+ <i class="bi bi-cloud-arrow-up display-4 text-primary"></i>
45
+ <h5 class="mt-3">Drag & Drop Files Here</h5>
46
+ <p class="text-muted">Or click to browse files</p>
47
+ <input type="file" id="resume-files" name="resume_files" class="d-none" multiple accept=".pdf,.doc,.docx">
48
+ <button type="button" class="btn btn-outline-primary mt-2" id="browse-files">Browse Files</button>
49
+ </div>
50
+ </div>
51
+
52
+ <div id="file-list-container" class="mb-4" style="display: none;">
53
+ <label class="form-label">Selected Files</label>
54
+ <div class="list-group" id="file-list">
55
+ <!-- Files will be listed here -->
56
+ </div>
57
+ </div>
58
+
59
+ <div class="mb-4">
60
+ <div class="form-check">
61
+ <input class="form-check-input" type="checkbox" id="auto-process" name="auto_process" checked>
62
+ <label class="form-check-label" for="auto-process">
63
+ Automatically process resumes after upload
64
+ </label>
65
+ </div>
66
+ </div>
67
+
68
+ <div class="text-center">
69
+ <button type="submit" class="btn btn-primary" id="upload-btn">
70
+ <span class="spinner-border spinner-border-sm d-none" id="upload-spinner" role="status" aria-hidden="true"></span>
71
+ Upload Resumes
72
+ </button>
73
+ </div>
74
+ </form>
75
+ </div>
76
+ </div>
77
+
78
+ <div class="card mb-4" id="upload-progress-card" style="display: none;">
79
+ <div class="card-header bg-info text-white">
80
+ Upload Progress
81
+ </div>
82
+ <div class="card-body">
83
+ <div class="d-flex justify-content-between mb-2">
84
+ <span id="progress-text">Uploading files...</span>
85
+ <span id="progress-percent">0%</span>
86
+ </div>
87
+ <div class="progress">
88
+ <div class="progress-bar progress-bar-striped progress-bar-animated" id="upload-progress-bar" role="progressbar" style="width: 0%"></div>
89
+ </div>
90
+ <div class="mt-3 small" id="file-status-container">
91
+ <!-- Individual file statuses will be shown here -->
92
+ </div>
93
+ </div>
94
+ </div>
95
+
96
+ <div class="card" id="upload-result-card" style="display: none;">
97
+ <div class="card-header bg-success text-white">
98
+ Upload Complete
99
+ </div>
100
+ <div class="card-body">
101
+ <div class="text-center mb-4">
102
+ <i class="bi bi-check-circle-fill text-success display-1"></i>
103
+ <h4 class="mt-3">Resumes Uploaded Successfully</h4>
104
+ <p id="result-summary">0 files have been uploaded and queued for processing.</p>
105
+ </div>
106
+ <div class="d-flex justify-content-center gap-3">
107
+ <a href="/resume-scoring" class="btn btn-primary">View Processing Results</a>
108
+ <button type="button" class="btn btn-outline-secondary" id="upload-more-btn">Upload More Resumes</button>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
117
+ <script>
118
+ document.addEventListener('DOMContentLoaded', function() {
119
+ // File list for tracking uploaded files
120
+ let selectedFiles = [];
121
+
122
+ // Load job listings for the dropdown
123
+ fetch('/api/jobs')
124
+ .then(response => response.json())
125
+ .then(data => {
126
+ const jobSelect = document.getElementById('job-select');
127
+ jobSelect.innerHTML = '';
128
+
129
+ if (data.jobs.length === 0) {
130
+ const option = document.createElement('option');
131
+ option.value = '';
132
+ option.textContent = 'No jobs available - create a job description first';
133
+ jobSelect.appendChild(option);
134
+ document.getElementById('upload-btn').disabled = true;
135
+ } else {
136
+ const defaultOption = document.createElement('option');
137
+ defaultOption.value = '';
138
+ defaultOption.textContent = 'Select a job position';
139
+ jobSelect.appendChild(defaultOption);
140
+
141
+ data.jobs.forEach(job => {
142
+ const option = document.createElement('option');
143
+ option.value = job.id;
144
+ option.textContent = job.title;
145
+ jobSelect.appendChild(option);
146
+ });
147
+ }
148
+ })
149
+ .catch(error => {
150
+ console.error('Error loading jobs:', error);
151
+ document.getElementById('job-select').innerHTML =
152
+ '<option value="">Error loading jobs</option>';
153
+ });
154
+
155
+ // File input handling
156
+ document.getElementById('browse-files').addEventListener('click', function() {
157
+ document.getElementById('resume-files').click();
158
+ });
159
+
160
+ document.getElementById('resume-files').addEventListener('change', function(e) {
161
+ handleFileSelection(this.files);
162
+ });
163
+
164
+ // Drag and drop handling
165
+ const dropArea = document.getElementById('drop-area');
166
+
167
+ ['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
168
+ dropArea.addEventListener(eventName, preventDefaults, false);
169
+ });
170
+
171
+ function preventDefaults(e) {
172
+ e.preventDefault();
173
+ e.stopPropagation();
174
+ }
175
+
176
+ ['dragenter', 'dragover'].forEach(eventName => {
177
+ dropArea.addEventListener(eventName, highlight, false);
178
+ });
179
+
180
+ ['dragleave', 'drop'].forEach(eventName => {
181
+ dropArea.addEventListener(eventName, unhighlight, false);
182
+ });
183
+
184
+ function highlight() {
185
+ dropArea.classList.add('border-primary');
186
+ }
187
+
188
+ function unhighlight() {
189
+ dropArea.classList.remove('border-primary');
190
+ }
191
+
192
+ dropArea.addEventListener('drop', function(e) {
193
+ const dt = e.dataTransfer;
194
+ const files = dt.files;
195
+ handleFileSelection(files);
196
+ });
197
+
198
+ // Handle selected files
199
+ function handleFileSelection(files) {
200
+ if (files.length === 0) return;
201
+
202
+ // Filter only valid file types
203
+ const validFiles = Array.from(files).filter(file => {
204
+ const fileType = file.type.toLowerCase();
205
+ return fileType === 'application/pdf' ||
206
+ fileType === 'application/msword' ||
207
+ fileType === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
208
+ });
209
+
210
+ if (validFiles.length === 0) {
211
+ alert('Please select valid resume files (PDF, DOC, DOCX)');
212
+ return;
213
+ }
214
+
215
+ // Add to selected files array
216
+ selectedFiles = [...selectedFiles, ...validFiles];
217
+
218
+ // Display file list
219
+ updateFileList();
220
+ }
221
+
222
+ function updateFileList() {
223
+ const fileListContainer = document.getElementById('file-list-container');
224
+ const fileList = document.getElementById('file-list');
225
+
226
+ if (selectedFiles.length === 0) {
227
+ fileListContainer.style.display = 'none';
228
+ return;
229
+ }
230
+
231
+ fileListContainer.style.display = 'block';
232
+ fileList.innerHTML = '';
233
+
234
+ selectedFiles.forEach((file, index) => {
235
+ const item = document.createElement('div');
236
+ item.className = 'list-group-item d-flex justify-content-between align-items-center';
237
+
238
+ const icon = file.type.includes('pdf') ? 'bi-file-earmark-pdf' : 'bi-file-earmark-word';
239
+
240
+ item.innerHTML = `
241
+ <div>
242
+ <i class="bi ${icon} me-2"></i>
243
+ <span>${file.name}</span>
244
+ <small class="text-muted ms-2">${formatFileSize(file.size)}</small>
245
+ </div>
246
+ <button type="button" class="btn btn-sm btn-outline-danger remove-file" data-index="${index}">
247
+ <i class="bi bi-trash"></i>
248
+ </button>
249
+ `;
250
+
251
+ fileList.appendChild(item);
252
+ });
253
+
254
+ // Add remove handlers
255
+ document.querySelectorAll('.remove-file').forEach(btn => {
256
+ btn.addEventListener('click', function() {
257
+ const index = parseInt(this.getAttribute('data-index'));
258
+ selectedFiles.splice(index, 1);
259
+ updateFileList();
260
+ });
261
+ });
262
+ }
263
+
264
+ function formatFileSize(bytes) {
265
+ if (bytes === 0) return '0 Bytes';
266
+
267
+ const k = 1024;
268
+ const sizes = ['Bytes', 'KB', 'MB'];
269
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
270
+
271
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
272
+ }
273
+
274
+ // Form submission
275
+ document.getElementById('resume-upload-form').addEventListener('submit', function(e) {
276
+ e.preventDefault();
277
+
278
+ const jobId = document.getElementById('job-select').value;
279
+ if (!jobId) {
280
+ alert('Please select a job position');
281
+ return;
282
+ }
283
+
284
+ if (selectedFiles.length === 0) {
285
+ alert('Please select at least one resume file');
286
+ return;
287
+ }
288
+
289
+ // Show upload progress card
290
+ document.getElementById('upload-progress-card').style.display = 'block';
291
+ document.getElementById('upload-progress-card').scrollIntoView({ behavior: 'smooth' });
292
+
293
+ // Disable submit button and show spinner
294
+ const uploadBtn = document.getElementById('upload-btn');
295
+ const uploadSpinner = document.getElementById('upload-spinner');
296
+ uploadBtn.disabled = true;
297
+ uploadSpinner.classList.remove('d-none');
298
+
299
+ // Create FormData for file upload
300
+ const formData = new FormData();
301
+ formData.append('job_id', jobId);
302
+ formData.append('auto_process', document.getElementById('auto-process').checked);
303
+
304
+ // Add all files
305
+ selectedFiles.forEach((file, index) => {
306
+ formData.append('resume_files', file);
307
+ });
308
+
309
+ // Simulate progress for demo
310
+ let progress = 0;
311
+ const progressBar = document.getElementById('upload-progress-bar');
312
+ const progressText = document.getElementById('progress-text');
313
+ const progressPercent = document.getElementById('progress-percent');
314
+ const fileStatusContainer = document.getElementById('file-status-container');
315
+
316
+ // Clear previous file statuses
317
+ fileStatusContainer.innerHTML = '';
318
+
319
+ // Add file status indicators
320
+ selectedFiles.forEach(file => {
321
+ const statusDiv = document.createElement('div');
322
+ statusDiv.className = 'd-flex justify-content-between mb-2';
323
+ statusDiv.innerHTML = `
324
+ <span>${file.name}</span>
325
+ <span class="badge bg-secondary">Pending</span>
326
+ `;
327
+ fileStatusContainer.appendChild(statusDiv);
328
+ });
329
+
330
+ // For demonstration, let's simulate the upload with progress
331
+ const progressInterval = setInterval(() => {
332
+ if (progress >= 100) {
333
+ clearInterval(progressInterval);
334
+ showUploadResults(selectedFiles.length);
335
+ return;
336
+ }
337
+
338
+ progress += 5;
339
+ progressBar.style.width = `${progress}%`;
340
+ progressPercent.textContent = `${progress}%`;
341
+
342
+ // Update file status randomly as we progress
343
+ if (progress > 30) {
344
+ const statuses = fileStatusContainer.querySelectorAll('.badge');
345
+ const randomIndex = Math.floor(Math.random() * statuses.length);
346
+
347
+ if (statuses[randomIndex].textContent === 'Pending') {
348
+ statuses[randomIndex].textContent = 'Uploading';
349
+ statuses[randomIndex].className = 'badge bg-info';
350
+ } else if (statuses[randomIndex].textContent === 'Uploading' && progress > 70) {
351
+ statuses[randomIndex].textContent = 'Complete';
352
+ statuses[randomIndex].className = 'badge bg-success';
353
+ }
354
+ }
355
+
356
+ // When progress is complete, update all remaining badges
357
+ if (progress === 100) {
358
+ const pendingStatuses = fileStatusContainer.querySelectorAll('.badge:not(.bg-success)');
359
+ pendingStatuses.forEach(badge => {
360
+ badge.textContent = 'Complete';
361
+ badge.className = 'badge bg-success';
362
+ });
363
+ progressText.textContent = 'Upload complete!';
364
+ }
365
+ }, 200);
366
+
367
+ // Remove simulation code and uncomment the actual implementation
368
+ fetch('/api/upload-resumes', {
369
+ method: 'POST',
370
+ body: formData
371
+ })
372
+ .then(response => response.json())
373
+ .then(data => {
374
+ if (data.success) {
375
+ showUploadResults(data.uploaded_count);
376
+ } else {
377
+ alert('Error uploading resumes: ' + data.error);
378
+ }
379
+ })
380
+ .catch(error => {
381
+ console.error('Error:', error);
382
+ alert('Error uploading resumes');
383
+ })
384
+ .finally(() => {
385
+ uploadBtn.disabled = false;
386
+ uploadSpinner.classList.add('d-none');
387
+ });
388
+ });
389
+
390
+ function showUploadResults(count) {
391
+ document.getElementById('result-summary').textContent =
392
+ `${count} files have been uploaded and queued for processing.`;
393
+
394
+ document.getElementById('upload-result-card').style.display = 'block';
395
+ document.getElementById('upload-result-card').scrollIntoView({ behavior: 'smooth' });
396
+
397
+ // Reset form for new uploads
398
+ document.getElementById('upload-more-btn').addEventListener('click', function() {
399
+ selectedFiles = [];
400
+ updateFileList();
401
+ document.getElementById('resume-upload-form').reset();
402
+ document.getElementById('upload-progress-card').style.display = 'none';
403
+ document.getElementById('upload-result-card').style.display = 'none';
404
+ document.getElementById('upload-btn').disabled = false;
405
+ document.getElementById('upload-spinner').classList.add('d-none');
406
+ });
407
+ }
408
+ });
409
+ </script>
410
+ </body>
411
+ </html>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: michael_agent
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: SmartRecruitAgent - A recruitment automation library
5
5
  Home-page: https://github.com/yourusername/agent
6
6
  Author: Michael Jone
@@ -6,7 +6,13 @@ michael_agent/config/settings.py,sha256=_4uvWQnMscK01Sd0zT5wesVW5uN0njtKYRMsjMQX
6
6
  michael_agent/dashboard/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  michael_agent/dashboard/app.py,sha256=UtMswD7TGGJBY9cMeuFQPJAtgaRiXFso6PsTHtvPGN8,61963
8
8
  michael_agent/dashboard/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ michael_agent/dashboard/static/styles.css,sha256=vSG1saAHIYxw_7sH5z9NipzvkRx3x4kMEjhgx0aUKow,6030
9
10
  michael_agent/dashboard/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ michael_agent/dashboard/templates/career_portal.html,sha256=ImVi7f2lvbv-xgQE7AtRpbrWDA_CbeQj02xGwOtS7-U,24128
12
+ michael_agent/dashboard/templates/dashboard.html,sha256=VepZKTvsaPQaCVR-Nxw00gx3ueiBZMxlIIIxr__6nKU,39877
13
+ michael_agent/dashboard/templates/jd_creation.html,sha256=5YqYLFhfQaE8GogWXuZeRQ24IHg7M_J9O3ai5ojhwhE,15931
14
+ michael_agent/dashboard/templates/resume_scoring.html,sha256=ylvM9OVGqi-T1XaAR49OYbuV_3KiKa2SswWGe2O5yOc,54843
15
+ michael_agent/dashboard/templates/upload_resume.html,sha256=mG-92r1L3A4N-tEdaSRd35ez92fx6Wg7y9gnvhObc_w,19995
10
16
  michael_agent/langgraph_workflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
17
  michael_agent/langgraph_workflow/graph_builder.py,sha256=xdsZ_lVWFn5B8xNXg_L49H-Jwfj-p7nxPVOwtc9Rf2U,14487
12
18
  michael_agent/langgraph_workflow/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -26,7 +32,7 @@ michael_agent/utils/lms_api.py,sha256=tmntU6tjyAdMLak_vfoxBkWNIPUKvejeEwb2t6yQBU
26
32
  michael_agent/utils/logging_utils.py,sha256=Ld7fs2uuCOM0bx-totxHzKzKHl5lfAe3TXeH1QYJBjw,7179
27
33
  michael_agent/utils/monitor_utils.py,sha256=1Ig6C79bQ_OOLKhgFNmm0ybntQavqzyJ3zsxD0iZxxw,11069
28
34
  michael_agent/utils/node_tracer.py,sha256=N1MWly4qfzh87Fo1xRS5hpefoAvfSyZIPvMOegPrtBY,3411
29
- michael_agent-1.0.2.dist-info/METADATA,sha256=4mAZuyRUC_RoCuQdFpaJnXK1kVSsTnqN36dFwRyPYE8,1340
30
- michael_agent-1.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- michael_agent-1.0.2.dist-info/top_level.txt,sha256=-r35JOIHnK3RsMhJ77tDKfWtmfGDr_iT2642k-suUDo,14
32
- michael_agent-1.0.2.dist-info/RECORD,,
35
+ michael_agent-1.0.4.dist-info/METADATA,sha256=sqpBqSp6klOnKtRHLKwTKWswuhQwEo7P6fv-QW3Y33s,1340
36
+ michael_agent-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ michael_agent-1.0.4.dist-info/top_level.txt,sha256=-r35JOIHnK3RsMhJ77tDKfWtmfGDr_iT2642k-suUDo,14
38
+ michael_agent-1.0.4.dist-info/RECORD,,