The tailor_from_url.py script provides a simple, unified workflow for:
- Fetching job listings from URLs
- Tailoring resumes to job descriptions
- Generating HTML/DOCX output
This is the simplest way to go from job URL → tailored resume.
# Tailor Master Resume to job URL
python src/tailor_from_url.py \
--url "https://example.com/job-posting" \
--resume "Master Resume" \
--out out/tailored.html
# With DOCX export
python src/tailor_from_url.py \
--url "https://example.com/job-posting" \
--resume "Master Resume" \
--out out/tailored.html \
--docx
# With RAG enhancement
python src/tailor_from_url.py \
--url "https://example.com/job-posting" \
--resume "Master Resume" \
--out out/tailored.html \
--use-rag \
--theme modern-
Fetches Job Listing
- Downloads HTML from URL
- Extracts job title, company, location, description
- Saves as markdown to
data/job_listings/ - Auto-updates
data/job_listings/index.json
-
Tailors Resume
- Loads your resume (by name or file path)
- Extracts keywords from job description
- Scores and selects relevant experience bullets
- Optionally uses RAG for context-aware selection
-
Generates Output
- Creates professional HTML resume
- Optionally exports to DOCX
- Supports multiple themes
professional(default) - Clean, corporate lookmodern- Contemporary designexecutive- Premium appearancecreative- Unique, artistic style
| Argument | Description | Example |
|---|---|---|
--url |
Job listing URL | https://example.com/job |
--resume |
Resume name or file path | "Master Resume" or data/master_resume.json |
--out |
Output HTML file path | out/tailored.html |
| Argument | Description | Default |
|---|---|---|
--theme |
HTML theme | professional |
--docx |
Also export to DOCX | False |
--use-rag |
Use RAG for tailoring | False |
--use-llm-rewriting |
Use LLM for rewriting | False |
--vector-store |
RAG vector store path | data/rag/vector_store.json |
python src/tailor_from_url.py \
--url "https://www.linkedin.com/jobs/view/123456789" \
--resume "Master Resume" \
--out out/linkedin_job.htmlOutput:
out/linkedin_job.html- Tailored resumedata/job_listings/LinkedIn_Job_Title.md- Saved job listingdata/job_listings/index.json- Updated index
python src/tailor_from_url.py \
--url "https://example.com/careers/senior-engineer" \
--resume "Ford" \
--out out/ford_senior_engineer.html \
--docx \
--theme modernOutput:
out/ford_senior_engineer.html- HTML resumeout/ford_senior_engineer.docx- DOCX resumedata/job_listings/Senior_Engineer.md- Saved job listing
python src/tailor_from_url.py \
--url "https://example.com/devops-role" \
--resume "Master Resume" \
--out out/devops_tailored.html \
--use-rag \
--theme executiveFeatures:
- Retrieves relevant experiences from RAG vector store
- Scores bullets based on job requirements
- Selects most relevant experiences
- Generates tailored resume
User provides URL
↓
Fetch job listing from URL
↓
Extract job title, company, location, description
↓
Save to data/job_listings/
↓
Update data/job_listings/index.json
↓
Load resume (by name or path)
↓
Extract keywords from job description
↓
[Optional] Retrieve RAG context
↓
Score and select relevant bullets
↓
Generate HTML resume
↓
[Optional] Export to DOCX
↓
Output files ready
The script supports multiple ways to specify your resume:
--resume "data/master_resume.json"
--resume "data/resumes/abc123.json"--resume "Master Resume"
--resume "Ford"
--resume "Sidney_Jones_Engineering_Manager"The system automatically looks up the resume by name in data/resumes/index.json.
-
HTML Resume
- Location:
out/tailored.html(or specified path) - Format: Professional HTML with embedded CSS
- Themes: Professional, Modern, Executive, Creative
- Location:
-
DOCX Resume (if
--docxflag used)- Location:
out/tailored.docx - Format: Microsoft Word document
- Fully editable
- Location:
-
Job Listing (auto-saved)
- Location:
data/job_listings/Job_Title.md - Format: Markdown
- Contains: Title, company, location, description
- Location:
-
Index Update (auto-updated)
- Location:
data/job_listings/index.json - Contains: Metadata for all fetched job listings
- Fields: ID, title, company, location, file, created_at
- Location:
The agent can use this script to tailor resumes:
User: "Tailor my resume for this job: https://example.com/job"
Agent: "I'll tailor your resume to that job posting.
run: python src/tailor_from_url.py --url "https://example.com/job" --resume "Master Resume" --out out/tailored.html --docx
[After execution]
✅ Resume tailored successfully!
- HTML: out/tailored.html
- DOCX: out/tailored.docx
- Job listing saved to: data/job_listings/Job_Title.md
Solution: Make sure you're running from the repository root:
cd c:\source\repos\bpm\internal\agentic-resume-tailor
python src/tailor_from_url.py --url "..." --resume "..." --out "..."Solution: Check that the resume name exists:
# List available resumes
python -c "import json; print(json.load(open('data/resumes/index.json')))"Solution: Some sites have anti-bot protection. Try:
- Using a different URL
- Checking if the URL is publicly accessible
- Using a local HTML file for testing
Solution: Make sure the vector store exists:
ls -la data/rag/vector_store.jsonIf missing, build it first:
python src/rag/rag_indexer.pyRun the integration test:
python scripts/test_tailor_from_url.pyExpected output:
✅ ALL TESTS PASSED
- Fetch job listing: ~2-5 seconds
- Extract keywords: ~0.5 seconds
- Tailor resume: ~1-2 seconds
- Generate HTML: ~1-2 seconds
- Export DOCX: ~2-3 seconds
Total time: ~7-15 seconds (depending on options)
python src/tailor_from_url.py \
--url "https://example.com/job" \
--resume "Master Resume" \
--out out/tailored.html \
--use-rag \
--vector-store "data/rag/custom_store.json"python src/tailor_from_url.py \
--url "https://example.com/job" \
--resume "Master Resume" \
--out out/tailored.html \
--use-rag \
--use-llm-rewritingRequires:
- RAG enabled (
--use-rag) - LLM API key configured
- Vector store populated
tailor_from_url.py
├── fetch_job_listing() # Fetch from URL
├── ingest_jd() # Parse job description
├── extract_keywords() # Extract keywords
├── retrieve_rag_context() # [Optional] RAG retrieval
├── load_resume() # Load resume
├── select_and_rewrite() # Tailor bullets
├── generate_html_resume() # Generate HTML
└── generate_docx_from_html() # [Optional] Export DOCX
Status: ✅ Production Ready
Last Updated: 2025-10-26