-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_app.py
More file actions
101 lines (84 loc) · 3.69 KB
/
main_app.py
File metadata and controls
101 lines (84 loc) · 3.69 KB
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
import sys
import os
# Ensure src is in path
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
from src.data.job_fetcher import fetch_job_listings
from src.ai.skill_engine import extract_skills_from_jobs, generate_challenge_prompt
from src.utils.pdf_generator import CaseStudyGenerator
def clear_screen():
print("\033[H\033[J", end="")
def print_separator():
print("-" * 60)
def main():
clear_screen()
print("============================================================")
print(" SKILLPROOF: The AI Portfolio Factory (CLI Prototype)")
print("============================================================")
print("Target Vertical: Digital Marketing / Content Strategy")
print("Goal: Turn Job Market Data into a Hirable Asset in < 5 mins.")
print_separator()
# Step 1: User Context
user_name = input("Enter your name: ") or "Candidate One"
role_query = input("Target Role [default: Digital Marketing Manager]: ") or "Digital Marketing Manager"
# Step 2: Fetch Data
print_separator()
input(f"Press Enter to scan the job market for '{role_query}'...")
raw_jobs = fetch_job_listings(role_query)
# Step 3: Analyze Skills
skills = extract_skills_from_jobs(raw_jobs)
print(f"\n[INSIGHT] Top Skill Identified: {skills[0]['skill']} (Frequency: {skills[0]['frequency']})")
print(f"[INSIGHT] Emerging Tool: {skills[1]['skill']}")
# Step 4: Generate Challenge
print_separator()
print("Generating your unique Portfolio Challenge...")
challenge = generate_challenge_prompt(skills)
print("\n" + "="*20 + " YOUR MISSION " + "="*20)
print(f"TITLE: {challenge['title']}")
print(f"SCENARIO: {challenge['scenario']}")
print("STEPS:")
for step in challenge['task_steps']:
print(f" {step}")
print("="*54)
# Step 5: The "Sandbox" (User does the work)
print("\n[SIMULATION] In the real app, you would have 48 hours.")
print("Right now, type a brief summary of your solution to generate the PDF.")
print_separator()
user_solution = input("Paste your solution/approach here: ")
if not user_solution:
user_solution = "I utilized a chain-of-thought prompting strategy to align the brand voice..."
# Step 6: Payment Gate (Simulated)
print("\n[PAYMENT GATE] Generating PDF requires 'Audit & Portfolio' Pass ($49).")
# input("Press Enter to Simulate Payment...")
print("[PAYMENT] Payment Authorized.")
# Step 7: Generate PDF
pdf_data = {
"title": challenge['title'],
"user_name": user_name,
"sections": [
{
"heading": "The Market Demand",
"content": f"This project addresses the critical demand for '{skills[0]['skill']}' found in recent job listings for {role_query}."
},
{
"heading": "The Challenge Scenario",
"content": challenge['scenario']
},
{
"heading": "Candidate's Solution",
"content": user_solution
},
{
"heading": "Strategic Outcome",
"content": "Demonstrated ability to execute high-leverage workflows using modern AI tooling, directly applicable to immediate business needs."
}
]
}
pdf_filename = f"Portfolio_{user_name.replace(' ', '_')}.pdf"
gen = CaseStudyGenerator(pdf_filename)
gen.generate(pdf_data)
print_separator()
print(f"SUCCESS! Your verifiable portfolio asset is ready: {pdf_filename}")
print("Attach this to your next application.")
print("============================================================")
if __name__ == "__main__":
main()