[text] ats

Viewer

  1. class Applicant:
  2.     def __init__(self, name, email, phone, resume):
  3.         self.name = name
  4.         self.email = email
  5.         self.phone = phone
  6.         self.resume = resume
  7.  
  8.  
  9. class ATS:
  10.     def __init__(self):
  11.         self.applicants = []
  12.  
  13.     def add_applicant(self, applicant):
  14.         self.applicants.append(applicant)
  15.  
  16.     def search_applicants(self, keyword):
  17.         found_applicants = []
  18.         for applicant in self.applicants:
  19.             if keyword.lower() in applicant.name.lower() or \
  20.                keyword.lower() in applicant.email.lower() or \
  21.                keyword.lower() in applicant.phone.lower():
  22.                 found_applicants.append(applicant)
  23.         return found_applicants
  24.  
  25.     def filter_applicants(self, criteria):
  26.         filtered_applicants = []
  27.         # Implement filtering logic based on criteria
  28.         return filtered_applicants
  29.  
  30.     def display_applicants(self):
  31.         for index, applicant in enumerate(self.applicants, start=1):
  32.             print(f"Applicant {index}:")
  33.             print(f"Name: {applicant.name}")
  34.             print(f"Email: {applicant.email}")
  35.             print(f"Phone: {applicant.phone}")
  36.             print("-------------")
  37.  
  38. # Example usage:
  39. if __name__ == "__main__":
  40.     # Create instances of applicants
  41.     applicant1 = Applicant("John Doe", "john@example.com", "123-456-7890", "path/to/resume1.pdf")
  42.     applicant2 = Applicant("Jane Smith", "jane@example.com", "987-654-3210", "path/to/resume2.pdf")
  43.     
  44.     # Create instance of ATS
  45.     my_ats = ATS()
  46.  
  47.     # Add applicants to the ATS
  48.     my_ats.add_applicant(applicant1)
  49.     my_ats.add_applicant(applicant2)
  50.  
  51.     # Display all applicants
  52.     my_ats.display_applicants()
  53.  
  54.     # Search for applicants by keyword
  55.     keyword = "Jane"
  56.     found_applicants = my_ats.search_applicants(keyword)
  57.     print(f"Applicants found for keyword '{keyword}':")
  58.     for applicant in found_applicants:
  59.         print(applicant.name, applicant.email)
  60.  
  61.     # Implement additional features as per requirements
  62.  
  63.  

Editor

You can edit this paste and save as new:


File Description
  • ats
  • Paste Code
  • 21 Feb-2024
  • 2.03 Kb
You can Share it: