Skip to content

Commit

Permalink
#272 creates Processed folder (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemanth-Thaluru authored Oct 22, 2024
1 parent 973e367 commit 2e42634
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions run_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ def remove_old_files(files_path):
logging.info("Started to read from Data/Resumes")
try:
# Check if there are resumes present or not.
# If present then parse it.
remove_old_files(PROCESSED_RESUMES_PATH)
if not os.path.exists(PROCESSED_RESUMES_PATH):
# If not present then create one.
os.makedirs(PROCESSED_RESUMES_PATH)
else:
# If present then parse it.
remove_old_files(PROCESSED_RESUMES_PATH)

file_names = get_filenames_from_dir("Data/Resumes")
logging.info("Reading from Data/Resumes is now complete.")
Expand All @@ -59,8 +63,12 @@ def remove_old_files(files_path):
logging.info("Started to read from Data/JobDescription")
try:
# Check if there are resumes present or not.
if not os.path.exists(PROCESSED_JOB_DESCRIPTIONS_PATH):
# If not present then create one.
os.makedirs(PROCESSED_JOB_DESCRIPTIONS_PATH)
else:
# If present then parse it.
remove_old_files(PROCESSED_JOB_DESCRIPTIONS_PATH)
remove_old_files(PROCESSED_JOB_DESCRIPTIONS_PATH)

file_names = get_filenames_from_dir("Data/JobDescription")
logging.info("Reading from Data/JobDescription is now complete.")
Expand Down

0 comments on commit 2e42634

Please sign in to comment.