From 530fd06bbeb05abdc5a9ec30564acb1eb9e0b720 Mon Sep 17 00:00:00 2001 From: momithalasya Date: Tue, 15 Oct 2024 00:08:30 +0530 Subject: [PATCH] Deleted unnecessary files --- atsScoreFinder.js | 27 ------ atsscore.css | 78 ---------------- atsscore.html | 30 ------- atsscore.js | 51 ----------- client.js | 49 ----------- demo.html | 220 ---------------------------------------------- server.js | 69 --------------- test.js | 9 -- 8 files changed, 533 deletions(-) delete mode 100644 atsScoreFinder.js delete mode 100644 atsscore.css delete mode 100644 atsscore.html delete mode 100644 atsscore.js delete mode 100644 client.js delete mode 100644 demo.html delete mode 100644 server.js delete mode 100644 test.js diff --git a/atsScoreFinder.js b/atsScoreFinder.js deleted file mode 100644 index ff31364..0000000 --- a/atsScoreFinder.js +++ /dev/null @@ -1,27 +0,0 @@ -// atsScoreFinder.js - -function calculateATSScore(resumeText, jobDescription) { - const resumeKeywords = resumeText.split(/\W+/).map(word => word.toLowerCase()); - const jobKeywords = jobDescription.split(/\W+/).map(word => word.toLowerCase()); - - const matchedKeywords = resumeKeywords.filter(word => jobKeywords.includes(word)); - const score = (matchedKeywords.length / jobKeywords.length) * 100; - - return score; -} - -function analyzeFormatting(resumeText) { - const feedback = []; - const lines = resumeText.split('\n'); - - if (lines.length < 3) { - feedback.push("Resume should have at least 3 lines."); - } - if (resumeText.length < 300) { - feedback.push("Resume is too short; consider adding more content."); - } - - return feedback; -} - -module.exports = { calculateATSScore, analyzeFormatting }; diff --git a/atsscore.css b/atsscore.css deleted file mode 100644 index 510a9b0..0000000 --- a/atsscore.css +++ /dev/null @@ -1,78 +0,0 @@ -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - font-family: Arial, sans-serif; - background-color: #f4f4f4; - padding: 20px; -} - -.container { - max-width: 600px; - margin: 0 auto; - background-color: white; - padding: 20px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); - border-radius: 8px; -} - -h1 { - text-align: center; - color: #333; - margin-bottom: 20px; -} - -label { - display: block; - margin-bottom: 10px; - font-weight: bold; - color: #555; -} - -input[type="file"], -textarea { - width: 100%; - padding: 10px; - margin-bottom: 20px; - border: 1px solid #ccc; - border-radius: 4px; -} - -textarea { - resize: vertical; -} - -button { - display: block; - width: 100%; - padding: 10px; - background-color: #28a745; - color: white; - border: none; - border-radius: 4px; - cursor: pointer; - font-size: 16px; -} - -button:hover { - background-color: #218838; -} - -#result-section { - margin-top: 20px; - text-align: center; -} - -#score { - font-size: 2em; - color: #28a745; -} - -#feedback { - margin-top: 10px; - font-size: 1.2em; - color: #555; -} diff --git a/atsscore.html b/atsscore.html deleted file mode 100644 index 1f6a4e1..0000000 --- a/atsscore.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Resume ATS Score Finder - - - -
-

Resume ATS Score Finder

- - - - - - - - - - - -
-

ATS Compatibility Score:

-

Feedback:

-
-
- - - diff --git a/atsscore.js b/atsscore.js deleted file mode 100644 index 1c2d237..0000000 --- a/atsscore.js +++ /dev/null @@ -1,51 +0,0 @@ -// Function to calculate the ATS score based on job description and resume -function calculateATSScore(jobDescription, resumeText) { - // Normalize text by converting to lowercase to ensure case-insensitive matching - const jobDescriptionLower = jobDescription.toLowerCase(); - const resumeTextLower = resumeText.toLowerCase(); - - // Split the text into arrays of words using space or comma as separators - const jobKeywords = jobDescriptionLower.split(/[\s,]+/); // Keywords from job description - const resumeWords = resumeTextLower.split(/[\s,]+/); // Words from resume - - // Count how many keywords from the job description appear in the resume - let matchCount = 0; - jobKeywords.forEach(keyword => { - if (resumeWords.includes(keyword)) { - matchCount++; - } - }); - - // Calculate the percentage match as the ATS score - const score = (matchCount / jobKeywords.length) * 100; - return Math.round(score * 100) / 100; // Round the score to two decimal places -} - -// Function to provide feedback based on the ATS score -function displayFeedback(score) { - if (score === 100) { - return "Excellent! Your resume is highly compatible with the job description."; - } else if (score >= 75) { - return "Good job! Your resume is quite compatible, but consider adding more relevant keywords."; - } else if (score >= 50) { - return "Fair. Your resume needs improvement. Focus on including more keywords from the job description."; - } else { - return "Low compatibility. Revise your resume to better match the job description."; - } -} - -// Main function to handle form submission -document.getElementById("analyze-button").addEventListener("click", function() { - const jobDescription = document.getElementById("job-description").value; - const resumeText = document.getElementById("resume-text").value; - - if (jobDescription && resumeText) { - const atsScore = calculateATSScore(jobDescription, resumeText); - const feedback = displayFeedback(atsScore); - - document.getElementById("score").innerText = atsScore + "%"; - document.getElementById("feedback").innerText = feedback; - } else { - document.getElementById("feedback").innerText = "Please enter both the job description and resume."; - } -}); diff --git a/client.js b/client.js deleted file mode 100644 index cda15e4..0000000 --- a/client.js +++ /dev/null @@ -1,49 +0,0 @@ -// ATS Score Calculation Functionality -document.getElementById('atsForm').addEventListener('submit', function (event) { - event.preventDefault(); // Prevent form submission - - const resumeInput = document.getElementById('resumeInput').value; - const resumeFile = document.getElementById('resumeFile').files[0]; - - let resumeText = resumeInput; - - if (resumeFile) { - const reader = new FileReader(); - reader.onload = function (e) { - const fileContent = e.target.result; - // Here you could extract text from the file - resumeText = fileContent; // For demo purposes, directly use file content - calculateATSScore(resumeText); - }; - reader.readAsText(resumeFile); - } else { - calculateATSScore(resumeText); - } -}); - -function calculateATSScore(resumeText) { - // Sample ATS score calculation logic - const keywords = ["JavaScript", "HTML", "CSS", "Python", "Java"]; // Example keywords - let score = 0; - - keywords.forEach(keyword => { - if (resumeText.includes(keyword)) { - score += 20; // Increment score for each keyword found - } - }); - - // Display the result - document.getElementById('score').innerText = `${score}/100`; - document.getElementById('feedback').innerText = getFeedback(score); - document.getElementById('atsResult').style.display = 'block'; -} - -function getFeedback(score) { - if (score >= 80) { - return "Great job! Your resume is highly compatible with ATS."; - } else if (score >= 50) { - return "Your resume is moderately compatible. Consider adding more keywords."; - } else { - return "Your resume may not perform well with ATS. It's recommended to revise it."; - } -} diff --git a/demo.html b/demo.html deleted file mode 100644 index 8d891f1..0000000 --- a/demo.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - Resume ATS Score Finder - - - - - - - - - - -
-

Resume ATS Score Finder

- - - - - - - - - - - -
ATS Compatibility Score: 0%
-
-
- - - - - diff --git a/server.js b/server.js deleted file mode 100644 index 84564c7..0000000 --- a/server.js +++ /dev/null @@ -1,69 +0,0 @@ -const express = require('express'); -const bodyParser = require('body-parser'); -const multer = require('multer'); -const fs = require('fs'); -const path = require('path'); - -const app = express(); -const PORT = process.env.PORT || 3000; - -// Middleware -app.use(bodyParser.json()); -app.use(bodyParser.urlencoded({ extended: true })); -app.use(express.static('public')); // Serve static files from the 'public' directory - -// Set up multer for file uploads -const upload = multer({ dest: 'uploads/' }); // Destination for uploaded files - -// Serve the main HTML page -app.get('/', (req, res) => { - res.sendFile(path.join(__dirname, 'public', 'index.html')); -}); - -// Handle ATS score calculation -app.post('/calculate-ats-score', upload.single('resumeFile'), (req, res) => { - let resumeText = req.body.resumeInput; - - if (req.file) { - const fileContent = fs.readFileSync(req.file.path, 'utf8'); // Read uploaded file - resumeText += '\n' + fileContent; // Combine text from textarea and file - } - - const score = calculateATSScore(resumeText); - res.json({ score, feedback: getFeedback(score) }); - - // Optionally delete the uploaded file after processing - if (req.file) { - fs.unlinkSync(req.file.path); - } -}); - -// Function to calculate ATS score -function calculateATSScore(resumeText) { - const keywords = ["JavaScript", "HTML", "CSS", "Python", "Java"]; // Example keywords - let score = 0; - - keywords.forEach(keyword => { - if (resumeText.includes(keyword)) { - score += 20; // Increment score for each keyword found - } - }); - - return score; -} - -// Function to get feedback based on the score -function getFeedback(score) { - if (score >= 80) { - return "Great job! Your resume is highly compatible with ATS."; - } else if (score >= 50) { - return "Your resume is moderately compatible. Consider adding more keywords."; - } else { - return "Your resume may not perform well with ATS. It's recommended to revise it."; - } -} - -// Start the server -app.listen(PORT, () => { - console.log(`Server is running on http://localhost:${PORT}`); -}); diff --git a/test.js b/test.js deleted file mode 100644 index 5791b51..0000000 --- a/test.js +++ /dev/null @@ -1,9 +0,0 @@ -// test.js - -const { calculateATSScore } = require('./atsScoreFinder'); - -const resumeText = "Experienced software engineer with a strong background in JavaScript and web development. Proficient in React, Node.js, and agile methodologies. Excellent problem-solving skills and a passion for technology."; -const jobDescription = "We are looking for a software engineer with experience in JavaScript and React. The ideal candidate should have strong problem-solving skills and experience in agile methodologies."; - -const score = calculateATSScore(resumeText, jobDescription); -console.log(`ATS Score: ${score.toFixed(2)}%`);