diff --git a/gpt.py b/gpt.py index 74e6804..e2815a0 100644 --- a/gpt.py +++ b/gpt.py @@ -167,17 +167,19 @@ class GPTAnswerer: def get_resume_html(self): resume_markdown_prompt = ChatPromptTemplate.from_template(strings.resume_markdown_template) fusion_job_description_resume_prompt = ChatPromptTemplate.from_template(strings.fusion_job_description_resume_template) - resume_markdown_chain = resume_markdown_prompt | self.llm_cheap | StrOutputParser() fusion_job_description_resume_chain = fusion_job_description_resume_prompt | self.llm_cheap | StrOutputParser() + + casual_markdown_path = os.path.abspath("resume_template/casual_markdown.js") + reorganize_header_path = os.path.abspath("resume_template/reorganizeHeader.js") + resume_css_path = os.path.abspath("resume_template/resume.css") - #html_template = strings.html_template.format(email_address=self.resume.personal_information.email, phone_number=self.resume.personal_information.phonePrefix + self.resume.personal_information.phone , github_link=self.resume.personal_information.github, linkedin_link=self.resume.personal_information.linkedin,city=self.resume.personal_information.city,country=self.resume.personal_information.country) - + html_template = strings.html_template.format(casual_markdown=casual_markdown_path, reorganize_header=reorganize_header_path, resume_css=resume_css_path) composed_chain = ( resume_markdown_chain | (lambda output: {"job_description": self.job.summarize_job_description, "formatted_resume": output}) | fusion_job_description_resume_chain - | (lambda formatted_resume: strings.html_template + formatted_resume) + | (lambda formatted_resume: html_template + formatted_resume) ) try: diff --git a/linkedIn_easy_applier.py b/linkedIn_easy_applier.py index f0dfb1b..38a0c4b 100644 --- a/linkedIn_easy_applier.py +++ b/linkedIn_easy_applier.py @@ -87,8 +87,8 @@ class LinkedInEasyApplier: def _scroll_page(self) -> None: scrollable_element = self.driver.find_element(By.TAG_NAME, 'html') - # utils.scroll_slow(self.driver, scrollable_element, step=300, reverse=False) - # utils.scroll_slow(self.driver, scrollable_element, step=300, reverse=True) + utils.scroll_slow(self.driver, scrollable_element, step=300, reverse=False) + utils.scroll_slow(self.driver, scrollable_element, step=300, reverse=True) def _fill_application_form(self): while True: @@ -195,9 +195,9 @@ class LinkedInEasyApplier: file_path_pdf = os.path.join(folder_path, file_name_pdf) with open(file_path_pdf, "wb") as f: - f.write(base64.b64decode(utils.HTML_to_PDF(file_name_HTML,True))) + f.write(base64.b64decode(utils.HTML_to_PDF(file_name_HTML))) - element.send_keys(file_path_pdf) + element.send_keys(os.path.abspath(file_path_pdf)) time.sleep(2) # Give some time for the upload process os.remove(file_name_HTML) return True diff --git a/resume_template/casual-markdown.js b/resume_template/casual_markdown.js similarity index 100% rename from resume_template/casual-markdown.js rename to resume_template/casual_markdown.js diff --git a/resume_template/reorganizeHeader.js b/resume_template/reorganizeHeader.js index b867ea0..65b5032 100644 --- a/resume_template/reorganizeHeader.js +++ b/resume_template/reorganizeHeader.js @@ -40,4 +40,4 @@ function reorganizeHeader() { setTimeout(function() { reorganizeHeader(); - }, 100); + }, 1000); diff --git a/strings.py b/strings.py index 2d605c3..281c731 100644 --- a/strings.py +++ b/strings.py @@ -25,6 +25,12 @@ Provide guidance on how to enhance the presentation of the information to maximi ``` # [Full Name] +[Your City, Your Country](Maps link) +[Your Prefix Phone number](tel: Your Prefix Phone number) +[Your Email](mailto:Your Email) +[LinkedIn](Link LinkedIn account) +[GitHub](Link GitHub account) + ## Summary [Brief professional summary highlighting your experience, key skills, and career objectives. 2-3 sentences.] @@ -38,7 +44,7 @@ Provide guidance on how to enhance the presentation of the information to maximi - **Skill4:** [details (max 15 word)] - **Skill5:** [details (max 15 word)] -## Professional Experience +## Working Experience ### [Job Title] **[Company Name]** – [City, State] @@ -126,39 +132,13 @@ html_template = """