File size: 3,752 Bytes
ece3e8e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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!")