Weekend-1 # Project-1-cli Resume Keyword Checker

..........
5 min read

The first mini project I decided to build this weekend is :- a CLI resume keyword checker.

A CLI resume keyword checker is a tool that scans your resume and compares it against a job description to see if you’ve included the important keywords that recruiters and Applicant Tracking Systems (ATS) are looking for. It basically filters out needed candidates easily. Since it includes a little bit of file handling, i wouldn’t exactly call it beginner level. But it’s a perfect example of how small scripts improve logical thinking and problem-solving in Python. Scripts like this improves your logical thinking and practical knowledge in python. While writing the simple resume keyword checker I used AI for doubt clearance. I recognized one of my severe FLAW - which was my logical thinking and problem solving is a bit problematic. I have so much to improve regarding that part of me . After writing this mini project , which i’m glad for taking initiative, I got a major insight into where my problems lies. I learned some new stuffs too. That’s why I always reccomending to follow the side paths which you accidentally stumbles upon, when you try learning to code.

RESUME KEYWORD CHECKER:

WHAT DOES THIS TOOL DOES:

  • Reads a resume text file.

  • Reads a job description text file.

  • Finds which skills match and which are missing.

  • Shows a match percentage.

  • colorama is used to display colourful CLI output

output:

What i learned new:

  • basics of file handling

  • basics of a filtering tool

  • two set operations- intersection , set difference operator

  • A cool, colorful library called colorama

EXPLANATION OF CODE:

I have created two files in same folder - job.txt, resume.txt . job.txt includes the job requirements recruiters looking for ( eg: SQL, AI,ML) and resume.txt includes a simple resume model . What we are going to do is reading the files and comparing both of them to find matching keywords and mismatching keywords. We can also print the percentage of match. We compare two txt files using python code written in .py file

STEP 1: we will read both files using ‘with open (…) as file:’

This is basics of file handling. open()-this built in function open a file so that you can read or write.

’file’ -creates a variable named file to represent opened file.

we use ‘with’ ,to ensure file will automatically close after we read or write it. the file closes once the identation of with ends. If you dont use ‘with’ you will have to manually close file with .close().

we store the contents of each files to ‘job_text’ and ‘ resume_text’

STEP 2: After reading both files. we converts the text in files to sets using split () function.

here is why, split() function breaks a long string into individual words. This makes it easier to compare the content of the resume and job description word by word.

Why did we use sets?

reason : A set in Python is an unordered collection of unique items.
By converting the text into sets, we:

  • Remove duplicate words automatically (no repeated counting).

  • Make our percentage calculation more accurate, since repeated words won’t cause precision issues in the results.

  • resume_words→ the set of unique words from the resume.

  • job_words → the set of unique words from the job description.

STEP 3: we compare both sets created from two texts to find matching words and unmatching words.

  • From the sets ‘resume_words’ and ‘job_words’:

  • we need to find words that appear in both files ( matching skills) and words that is in job.txt but not in resume.txt( mismatched skills)

  • for that purpose we use two set operations .

    1. intersection () which returns common elements and store it to variable called matched

      matched = resume_words.intersection(job_words)

    2. Set difference - = which returns the elements in the first set that are not in the second set and store it to variable called not_matched

      not_matched = job_words - resume_words

STEP 4: calculate percentage:

This is simple. we calculate percentage by dividing the length of matched words we found by the length of keywords in job.txt then multiply it with 100

STEP 4: join the set and print the ‘matched’ and ‘not_matched’ and matching percentage

Tada!! your simple resume keyword checker using python is ready.

Additional:

I didn’t include colorama in main explanation because -i want to highlight it separately. Because this was cool and colourful library that I learned today deserves some big introduction( especially for beginners). Colorama is a Python library that lets you print colored text in the terminal — basically making your CLI pretty.

  • to use,you need to import it at beginning by ‘ from colorama import Fore, Style ’.

  • Fore - for controlling text colour.

  • Style-controls bold,dim, reset styles etc.

  • Check out the output screenshot I shared. In the code, I added Fore.red for ‘not_matched’ and Fore.green for ‘matched’ so that in terminal it would print in the red and green colours making the terminal look pretty cool.

  • Actually cool right? I learned about Colorama purely by accident while experimenting for this project. And honestly, that’s the magic of building stuffs by yourself ,you will learn 10 x faster than just passively watching tutorials.

Thats it for my weekend project . I have shared the GitHub link below. Try this code by yourself, add more modifications and experiment it to learn more new things. It’s ok if you didnt understand my explanation because learning coding is for oneself to experiment by themselves and learn from their own falls and errors. Feel free to check tutorials articles related to the topics i explained above

https://github.com/log-Null/Python-Scripts-For-Beginners-/tree/main/RESUME_MATCH_CHECKING

1
Subscribe to my newsletter

Read articles from ..... directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

.....
.....

Aspiring AI & Data Science Engineer | CSE Final Year student| Python • GenAI Enthusiast | Building & Blogging my journey