Skip to content

Commit

Permalink
Job Application Tracker
Browse files Browse the repository at this point in the history
Version 0.1
  • Loading branch information
Ioannis-D committed Nov 7, 2023
1 parent ba6c1cf commit fa07a85
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 0 deletions.
Binary file added Job Application Tracker logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
164 changes: 164 additions & 0 deletions Job_Application_Tracker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
#!/usr/bin/env python3

########################################################################
# Job Aplication Tracker #
# Easily track the job applications you have done. #
# Written in Pyton. #
# #
# Version 0.1 #
#----------------------------------------------------------------------#
# Licence: Apache License 2.0 #
# #
# Creator: Ioannis Doganos, github: https://github.com/Ioannis-D #
########################################################################

# ------------ LIBRARIES USED ------------
from datetime import date # For the current day
from pathlib import Path # To check if the spreadsheet exists
import pandas as pd # To manipulate the data and the spreadsheet
import time # For the sleep operation
import readline # To pre-print the Job and Company already given if the user wants to modify them
import argparse # For the help message

# ------------ HELP MESSAGE ------------
help_message = """
This is a program written in Python for letting you store your job applications nicely and tidy into a spreadsheet (.xlsx).
It is easy and fast to use:
Firstly, the program will ask you to insert the url of the job position you have applied.
Secondly, it will ask you for the Job Title and the Company's name.
Please note that empty cells are not allowed which means you will have to provide all three components else the tracking is stopped.
You can leave the program open until you are done with all your applications for the day.
At the end, your new registrations will be shown to you in order to make possible changes in case of an error.
The program automatically records the date and inserts it in the spreadsheet.
You do not have to create any spreadsheet yourself. Once run, the program creates everything for you!
So, good luck with your job hunting and be sure to track it!
"""

parser = argparse.ArgumentParser(prog="Job Application Tracker",
formatter_class=argparse.RawDescriptionHelpFormatter,
description=help_message
)
args = parser.parse_args()

# ------------ FUNCTIONS ------------

# Make sure no job title or company is added empty. In this case, ask the user if he wants to exit the program.
def titles(_input):
title = input(_input)
if title != "":
return title
else:
print(f"You didn't provide a {_input}.")
print("Press Enter if you wanna exit the program")
title = input(_input)
if title != "":
return title
else:
return

# Stop the process of job applications recording if the user wants it.
def empty_titles(title):
if title != None: return False
else: return True

# Write the dataframe to Excel
def write_spreadsheet(path, df):
df.to_excel(
"./Job_Aplications.xlsx",
sheet_name="Job Applications",
index=False
)

# Check the input when the user gives a number to modify the data given
def check_input(position_number,df_temp):
try:
df_temp.iloc[int(position_number)]
except:
return False
else:
return True
# Change the input
def change_input(position_number, title, df_temp):
given_title = df_temp[title].iloc[int(position_number)]
new_title = input_with_prefill(f"{title}: ", given_title)
return new_title

# Return the given job or company name if to be modified
def input_with_prefill(prompt, text):
def hook():
readline.insert_text(text)
readline.redisplay()
readline.set_pre_input_hook(hook)
result = input(prompt)
readline.set_pre_input_hook()
return result


# ------------ MAIN PROGRAM ------------

# Register the date in the form dd/mm/yy
today = date.today().strftime("%d/%m/%y")

# Create an empty df to store the new data. Later on, it is added to the existing data in excel
df_temp = pd.DataFrame(columns=['Company', 'Job Title', 'url', 'Date of Aplication'])

# Keep the program alive until the user does not give a url or until empty job title or company name is given twice.
while True:

# Ask for the url, the job title and the company's name
url = input("URL: (press ENTER to finish) ")
if(url == ""): # If url is given empty it means the user wants to exit.
print("Exiting.\nGood luck with the applications\n")
break

job_title = titles("Job Title: ")
if empty_titles(job_title): break

company_name = titles("Company Name: ")
if empty_titles(company_name): break

# Insert the data into the dataframe
df_temp.loc[len(df_temp)] = [company_name, job_title, url, today]
print(f"\n{job_title} in {company_name} has been recorded\n")
print("----------------------------------\n")

# Check if the user has given some data, else exit
if df_temp.empty:
exit()

while True:
# Show the data to confirm or to modidy them
print("These are the data: \n")
print(df_temp[['Company', 'Job Title']])

# Ask the user if he wants to change something
position_number = input("Give number of a job to change, else save with Enter: ")
if position_number == "": break
else:
if check_input(position_number, df_temp):
for title in ['Job Title', 'Company']:
df_temp[title].iloc[int(position_number)] = change_input(position_number, title, df_temp)
else:
print(f"\nYou must give a number between 0 and {len(df_temp)-1}\n")
time.sleep(1) # Make sure the user sees the message

# If spreadsheet exists, read it and add the new data.
spreadsheet = Path("./Job_Aplications.xlsx") # The excel file's path
if spreadsheet.exists():
df_original = pd.read_excel(spreadsheet)

# Join the two dataframes
df_original = pd.concat([df_temp, df_original], ignore_index=True)

df_original[['Company', 'Job Title']].dropna() # Remove if Company or Job Title is not provided

# Write the new df into the spreadsheet
write_spreadsheet(spreadsheet, df_original)

# If it does not exist, create it
else:
write_spreadsheet(spreadsheet, df_temp)
52 changes: 52 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<p align="center">
<img src="./Job Application Tracker logo.png" />
</p>

### ABOUT
---

Searching for a job can be challenging and it is a 'job' by itself. Sometimes, especially recently graduates, apply for a number of jobs everyday just to start their career. But also, recently unemployed or even senior professionals that search for a new opportunity tend to be lost after some days of applications without being sure where and when they have applied.

This program helps everyone track their job applications fast and easily. The only thing the user has to do is to provide the url, the job title and the company's name for every applied position. Then, the program automatically creates or modifies a spreadsheet application.

The user doesn't have to create anything, the program does it.

Run the program and make sure you track your process of job applications! Oh, and good luck with it!.

### HOW TO USE IT
---
It is advised to create a new directory (for example Job Applications) and save the program there. Then, from that directory you can run the Job Applications Tracker.

First, it asks for a url* and then for the job title and the company's name. You can leave it running while you apply for different job positions.

The program stops when an empty url, job title or company's name is given.

Once you have done with the applications, give an empty url and the program will show you all the last instances created. If you have made a mistake, fear not. Once you have finished, you will be shown your contributions and you can modify any mistaken instance.

After you have checked that everything is as it should, all the records are passed to the spreadsheet, including the Company, the Job Title, the URL and the Day of Application.


(*apart from being able to review the job description, the url is asked for the future versions of the program with which some job applications will be automatically filled. See the [Future Lines](#future-lines) section for more details)

### DEPENDENCIES
---
The program is written completely in Python. Different libraries are used but the majority of them are already included in basic Python3.

- [Pandas](https://pandas.pydata.org/) is used for reading and writing the spreadsheet. Also the registers are passed in a DataFrame.

##### Pre-installed libraries used
- datetime
- pathlib
- re
- readline
- argparse

### FUTURE LINES
---
This version (0.1) is not the final version of the program. The program is to been designed to automate even more the process.

The next version (0.2) will automatically insert the Job Title and the Company's name if the url given will be either from Linkedin or InfoJobs (a commonly used job-searching website in Spain).

Even then, the program will not be complete. My first idea was to include a LLM (specifically, the Llama2 of Meta) to summarise the job description in one or two paragraphs. Version 1.0 will include this feature but it will be optional as Llama2 will have to run on the user's local machine.

Version 1.1 will also make optional the use of ChatGPT (with the user's credentials) for doing the summary.

0 comments on commit fa07a85

Please sign in to comment.