-
Notifications
You must be signed in to change notification settings - Fork 0
/
my_app.py
75 lines (61 loc) · 2.21 KB
/
my_app.py
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
from docx import Document
from docx.shared import Inches
import pyttsx3
def speak (text):
pyttsx3.speak(text)
document = Document()
# Profile photo
document.add_picture("hello.jpg",width = Inches(2.0))
# About name , phone number and email
name = input('What is your name ? ')
speak('Hello' + name + 'How are you today ?')
speak('What is your phone number ? ')
phone_number = input('What is your phone number ? ')
email = input('What is your email ? ')
document.add_paragraph(name + ' | ' + phone_number + ' | ' + email )
# About me
document.add_heading('About me')
document.add_paragraph(input('Tell about yourself ? '))
# Work experience
document.add_heading('Work experience : ')
p = document.add_paragraph()
company = input('Enter company : ')
from_date = input('From date : ')
to_date = input('To date : ')
p.add_run(company + ' : ').bold = True
p.add_run(from_date + '-' + to_date + '\n' ).italic = True
experience_details = input('describe your experiece at ' + company + ' ')
p.add_run(experience_details)
# More experiences
while True :
has_more_experiences = input('Do you have more experiences ? Yes or No ')
if has_more_experiences.lower() == 'yes' :
p = document.add_paragraph()
company = input('Enter company : ')
from_date = input('From date : ')
to_date = input('To date : ')
p.add_run(company + ' : ').bold = True
p.add_run(from_date + '-' + to_date + '\n' ).italic = True
experience_details = input('describe your experiece at ' + company + ' ')
p.add_run(experience_details)
else :
break
# Skills
document.add_heading('Skills')
skill = input('Enter skill : ')
p=document.add_paragraph(skill)
p.style = 'List Bullet'
while True :
has_more_skills = input('Do you have more skills ? Yes or No : ')
if has_more_skills.lower() == 'yes' :
skill = input('Enter skill : ')
p=document.add_paragraph(skill)
p.style = 'List Bullet'
else:
break
# Footer
section = document.sections[0]
footer = section.footer
p = footer.paragraphs[0]
p.text = "CV generated using yashcode and Intuit quickbooks project"
document.save('cv.docx')