bewerbung_generator module¶
Bewerbung Generator - Generates German job applications from profiles and job descriptions
- class bewerbung_generator.BewerbungGenerator(base_dir='.')[source]¶
Bases:
object
- get_newest_file_by_date_pattern(directory, pattern='(\\\\d{8})_.*')[source]¶
Find the newest file in directory based on YYYYMMDD date pattern
- read_newest_job_description()[source]¶
Step 2: Read the newest job description from Stellenbeschreibung/ directory
- extract_file_identifiers(profile_file, job_file)[source]¶
Extract date and identifier parts from profile and job filenames Returns: (profile_date, profile_id, job_date, job_id)
- create_output_directory(profile_file, job_file)[source]¶
Step 3: Create output directory with proper naming pattern Pattern: {job_date}_{job_id}-{profile_date}_{profile_id}
- Return type:
- generate_application_documents(output_dir, profile_file, job_file)[source]¶
Step 4: Generate application documents (cover letter, CV, attachments) with AI content
- bewerbung_generator.main()[source]¶
Main orchestration script - executes all 7 steps of the application generation process
Classes¶
- class bewerbung_generator.BewerbungGenerator(base_dir='.')[source]¶
- get_newest_file_by_date_pattern(directory, pattern='(\\\\d{8})_.*')[source]¶
Find the newest file in directory based on YYYYMMDD date pattern
- read_newest_job_description()[source]¶
Step 2: Read the newest job description from Stellenbeschreibung/ directory
- extract_file_identifiers(profile_file, job_file)[source]¶
Extract date and identifier parts from profile and job filenames Returns: (profile_date, profile_id, job_date, job_id)
- create_output_directory(profile_file, job_file)[source]¶
Step 3: Create output directory with proper naming pattern Pattern: {job_date}_{job_id}-{profile_date}_{profile_id}
- Return type:
- generate_application_documents(output_dir, profile_file, job_file)[source]¶
Step 4: Generate application documents (cover letter, CV, attachments) with AI content
Methods¶
Core Workflow Methods¶
- BewerbungGenerator.read_newest_profile()[source]¶
Step 1: Read the newest profile file from profil/ directory
- BewerbungGenerator.read_newest_job_description()[source]¶
Step 2: Read the newest job description from Stellenbeschreibung/ directory
- BewerbungGenerator.create_output_directory(profile_file, job_file)[source]¶
Step 3: Create output directory with proper naming pattern Pattern: {job_date}_{job_id}-{profile_date}_{profile_id}
- Return type:
Utility Methods¶
Usage Example¶
from bewerbung_generator import BewerbungGenerator
# Initialize generator
generator = BewerbungGenerator(base_dir=".")
# Run complete workflow
result = generator.run()
if result:
print("✅ Application generated successfully")
else:
print("❌ Generation failed")