cold-email-generator 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cold_email_generator/__init__.py +6 -0
- cold_email_generator/__main__.py +32 -0
- cold_email_generator/generator.py +61 -0
- cold_email_generator/templates.py +28 -0
- cold_email_generator-1.0.0.dist-info/METADATA +11 -0
- cold_email_generator-1.0.0.dist-info/RECORD +8 -0
- cold_email_generator-1.0.0.dist-info/WHEEL +5 -0
- cold_email_generator-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from cold_email_generator import ColdEmailGenerator
|
|
2
|
+
import sys
|
|
3
|
+
import json
|
|
4
|
+
|
|
5
|
+
gen = ColdEmailGenerator()
|
|
6
|
+
|
|
7
|
+
# Generate all 5 templates with sample data
|
|
8
|
+
templates = ["startup_pitch", "saas_demo", "cold_outreach", "follow_up", "warm_intro"]
|
|
9
|
+
|
|
10
|
+
print("=" * 60)
|
|
11
|
+
print("Cold Email Generator - Template Preview")
|
|
12
|
+
print("=" * 60)
|
|
13
|
+
|
|
14
|
+
for t in templates:
|
|
15
|
+
print(f"\n--- Template: {t} ---\n")
|
|
16
|
+
result = gen.generate(t,
|
|
17
|
+
name="John Doe",
|
|
18
|
+
company="Acme Corp",
|
|
19
|
+
industry="SaaS",
|
|
20
|
+
goal="automate their workflow",
|
|
21
|
+
value_proposal="Our tool integrates with your existing stack.",
|
|
22
|
+
role="Head of Growth",
|
|
23
|
+
outcome="reduce churn by 30%",
|
|
24
|
+
activity="building out their sales team",
|
|
25
|
+
warm_intro_text="A friend of yours mentioned you were looking for tools to help with outreach.",
|
|
26
|
+
sender="Jane Smith, Co-founder"
|
|
27
|
+
)
|
|
28
|
+
print(json.dumps(result, indent=2))
|
|
29
|
+
|
|
30
|
+
print("\n" + "=" * 60)
|
|
31
|
+
print("All 5 templates generated successfully!")
|
|
32
|
+
print("=" * 60)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""Cold email generation engine."""
|
|
2
|
+
|
|
3
|
+
import random
|
|
4
|
+
from cold_email_generator.templates import ColdEmailTemplates
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ColdEmailGenerator:
|
|
8
|
+
"""Generate personalized cold emails from templates."""
|
|
9
|
+
|
|
10
|
+
# Personalization prompts
|
|
11
|
+
IDEAS = [
|
|
12
|
+
"We've helped teams at companies like {company} save time and boost revenue.",
|
|
13
|
+
"I think you'd find our approach to {industry} interesting.",
|
|
14
|
+
"Your work on {activity} caught my attention.",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
SALES_TACTICS = [
|
|
18
|
+
"It's free to get started.",
|
|
19
|
+
"We offer a 14-day free trial.",
|
|
20
|
+
"Early access is currently available.",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
HEAT_TACTICS = [
|
|
24
|
+
"I'll keep this to 2 minutes of your time.",
|
|
25
|
+
"I'll send over a short case study.",
|
|
26
|
+
"I'll share a relevant resource.",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
TEMPLATES = ColdEmailTemplates
|
|
30
|
+
|
|
31
|
+
def generate(self, template_name, **kwargs):
|
|
32
|
+
"""Generate a cold email using a template."""
|
|
33
|
+
template = self.TEMPLATES.TEMPLATES[template_name]
|
|
34
|
+
email = template["body"]
|
|
35
|
+
email = self._deep_replace(email, **kwargs)
|
|
36
|
+
return {"template": template_name, "subject": template["subject"], "body": email}
|
|
37
|
+
|
|
38
|
+
def generate_with_variations(self, template_name, **kwargs):
|
|
39
|
+
"""Generate email + 3 subject line variations."""
|
|
40
|
+
email = self.generate(template_name, **kwargs)
|
|
41
|
+
subjects = self._generate_subject_variations(email["subject"])
|
|
42
|
+
return {**email, "subject_variations": subjects}
|
|
43
|
+
|
|
44
|
+
def _generate_subject_variations(self, base_subject):
|
|
45
|
+
"""Generate 3 subject line variations."""
|
|
46
|
+
parts = base_subject.split(" about ")
|
|
47
|
+
sample = random.choice(self.IDEAS)
|
|
48
|
+
return [
|
|
49
|
+
f"{parts[0]} — {sample}",
|
|
50
|
+
f"Quick question: {sample}",
|
|
51
|
+
f"Re: {base_subject}",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
def _deep_replace(self, text, **kwargs):
|
|
55
|
+
"""Deep replace {{variables}} in text."""
|
|
56
|
+
for key, value in kwargs.items():
|
|
57
|
+
template_var = "{{" + key + "}}"
|
|
58
|
+
placeholder = "{" + key + "}"
|
|
59
|
+
# Use a simple approach: replace both styles
|
|
60
|
+
text = text.replace(template_var, value).replace(placeholder, value)
|
|
61
|
+
return text
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""Pre-built cold email templates."""
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ColdEmailTemplates:
|
|
5
|
+
"""Collection of cold email templates."""
|
|
6
|
+
|
|
7
|
+
TEMPLATES = {
|
|
8
|
+
"startup_pitch": {
|
|
9
|
+
"subject": "Quick question about {company}",
|
|
10
|
+
"body": "Hi {name},\n\nI've been following {company}'s work in {industry} and wanted to share an idea that could help you {goal}.\n\n{value_proposal}\n\nWould you be open to a 15-minute chat?\n\nBest,\n{sender}"
|
|
11
|
+
},
|
|
12
|
+
"saas_demo": {
|
|
13
|
+
"subject": "How {company} could save 10+ hours/week",
|
|
14
|
+
"body": "Hi {name},\n\nWe built a tool that helps {role} at {company} {outcome}.\n\n{value_proposal}\n\n{cta}\n\nCheers,\n{sender}"
|
|
15
|
+
},
|
|
16
|
+
"cold_outreach": {
|
|
17
|
+
"subject": "{name} from {company}",
|
|
18
|
+
"body": "Hi {name},\n\nI noticed you're doing {activity} at {company}. I think you'll find this useful:\n\n{value_proposal}\n\n{cta}\n\n{sender}"
|
|
19
|
+
},
|
|
20
|
+
"follow_up": {
|
|
21
|
+
"subject": "Following up",
|
|
22
|
+
"body": "Hi {name},\n\nJust following up on my last message. I know you're busy, so I'll keep this short:\n\n{value_proposal}\n\n{cta}\n\n{sender}"
|
|
23
|
+
},
|
|
24
|
+
"warm_intro": {
|
|
25
|
+
"subject": "Thought of you",
|
|
26
|
+
"body": "Hi {name},\n\n{warm_intro_text}\n\n{value_proposal}\n\n{cta}\n\n{sender}"
|
|
27
|
+
},
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: cold-email-generator
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: AI-powered cold email creation tool with 5 customizable templates
|
|
5
|
+
Author: MeridianMind
|
|
6
|
+
Author-email: contact@meridianmind.dev
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.8
|
|
11
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
cold_email_generator/__init__.py,sha256=ygcsYmp1_aeS8gPNhUZnk5AeyKLA-CE2eiw0kE-_znw,247
|
|
2
|
+
cold_email_generator/__main__.py,sha256=kH1Ant_-2sZChWz0-cVyiOo-wPEM9CvTcvH8ztaBSz4,998
|
|
3
|
+
cold_email_generator/generator.py,sha256=rcn6ykNZS-p9qB0Km7YwTUQsNznMtIHuvNuaNdd5ETI,2195
|
|
4
|
+
cold_email_generator/templates.py,sha256=9DNjnXmsDhc4rM-pABZzD5DlGdJaoFvhffwt1gaXOOU,1348
|
|
5
|
+
cold_email_generator-1.0.0.dist-info/METADATA,sha256=TVr7u7G1gfW2usrBy0UzrUHU87JJkWS4d6Ah46zIH_Y,369
|
|
6
|
+
cold_email_generator-1.0.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
7
|
+
cold_email_generator-1.0.0.dist-info/top_level.txt,sha256=i2F43tThOs04Ja9dZElkd1H2ixpk_SZvG1m0roojoIo,21
|
|
8
|
+
cold_email_generator-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cold_email_generator
|