Spaces:
Paused
Paused
Download Telegram_Job_Bot/generate_sample_pdfs.py from telegramjobupload/README: direct link, hf CLI and curl.
- Browser
- Download file 3.75 kB
-
https://huggingface.co/spaces/telegramjobupload/README/resolve/main/Telegram_Job_Bot/generate_sample_pdfs.py
- Command line
-
hf download hf://spaces/telegramjobupload/README/Telegram_Job_Bot/generate_sample_pdfs.py
-
curl -L -o generate_sample_pdfs.py https://huggingface.co/spaces/telegramjobupload/README/resolve/main/Telegram_Job_Bot/generate_sample_pdfs.py
3.75 kB
| from fpdf import FPDF | |
| import os | |
| class PDF(FPDF): | |
| def header(self): | |
| self.set_font('Arial', 'B', 24) | |
| self.cell(0, 15, 'Manoj Kumar', 0, 1, 'C') | |
| self.set_font('Arial', '', 10) | |
| self.set_text_color(100, 100, 100) | |
| self.cell(0, 5, 'manoj@example.com | +91 9876543210 | github.com/manoj', 0, 1, 'C') | |
| self.ln(10) | |
| def create_resume(filename, title, objective, skills, experience): | |
| pdf = PDF() | |
| pdf.add_page() | |
| pdf.set_auto_page_break(auto=True, margin=15) | |
| # Title | |
| pdf.set_font('Arial', 'B', 14) | |
| pdf.set_text_color(0, 51, 102) | |
| pdf.cell(0, 10, title.upper(), 0, 1) | |
| pdf.line(10, pdf.get_y(), 200, pdf.get_y()) | |
| pdf.ln(5) | |
| # Objective | |
| pdf.set_font('Arial', '', 11) | |
| pdf.set_text_color(0, 0, 0) | |
| pdf.multi_cell(0, 6, objective) | |
| pdf.ln(8) | |
| # Skills | |
| pdf.set_font('Arial', 'B', 14) | |
| pdf.set_text_color(0, 51, 102) | |
| pdf.cell(0, 10, 'CORE SKILLS', 0, 1) | |
| pdf.line(10, pdf.get_y(), 200, pdf.get_y()) | |
| pdf.ln(5) | |
| pdf.set_font('Arial', '', 11) | |
| pdf.set_text_color(0, 0, 0) | |
| pdf.multi_cell(0, 6, skills) | |
| pdf.ln(8) | |
| # Experience | |
| pdf.set_font('Arial', 'B', 14) | |
| pdf.set_text_color(0, 51, 102) | |
| pdf.cell(0, 10, 'PROFESSIONAL EXPERIENCE', 0, 1) | |
| pdf.line(10, pdf.get_y(), 200, pdf.get_y()) | |
| pdf.ln(5) | |
| for job in experience: | |
| pdf.set_font('Arial', 'B', 12) | |
| pdf.cell(0, 6, job['role'], 0, 1) | |
| pdf.set_font('Arial', 'I', 11) | |
| pdf.set_text_color(100, 100, 100) | |
| pdf.cell(0, 6, job['company'], 0, 1) | |
| pdf.set_text_color(0, 0, 0) | |
| pdf.ln(2) | |
| pdf.set_font('Arial', '', 11) | |
| for bullet in job['bullets']: | |
| pdf.multi_cell(0, 6, f"- {bullet}") | |
| pdf.ln(6) | |
| pdf.output(filename) | |
| # 1. Create Generic "Before" Resume | |
| create_resume( | |
| "Generic_Resume_Before.pdf", | |
| "Software Engineer", | |
| "I am a passionate software engineer with 2 years of experience building web applications. I love coding and working in teams to build great user experiences. I am looking for a frontend developer role.", | |
| "HTML, CSS, JavaScript, React, Node, SQL, Git", | |
| [ | |
| { | |
| "role": "Software Engineer", | |
| "company": "TechCorp Solutions | 2024 - Present", | |
| "bullets": [ | |
| "Built a new dashboard for the company website.", | |
| "Made the website load faster by fixing some code.", | |
| "Managed data passing between different parts of the app." | |
| ] | |
| } | |
| ] | |
| ) | |
| # 2. Create Tailored "After" Resume | |
| create_resume( | |
| "Tailored_Stripe_Resume_After.pdf", | |
| "Frontend Developer", | |
| "Detail-oriented Frontend Developer with 2+ years of experience specializing in React.js and performance optimization. Passionate about building highly responsive, scalable UI components. Eager to bring my expertise in modern web technologies and state management to Stripe.", | |
| "React.js, State Management (Redux/Context), Responsive UI, JavaScript (ES6+), Performance Optimization, Git", | |
| [ | |
| { | |
| "role": "Software Engineer", | |
| "company": "TechCorp Solutions | 2024 - Present", | |
| "bullets": [ | |
| "Architected a responsive web dashboard using React.js, improving user retention by 15%.", | |
| "Implemented performance optimization techniques, reducing initial page load time by 40%.", | |
| "Engineered complex data flows using modern state management (Context API/Redux) for scalable UI components." | |
| ] | |
| } | |
| ] | |
| ) | |
| print("PDFs generated successfully!") | |