-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenposts.py
More file actions
41 lines (31 loc) · 1.19 KB
/
Copy pathgenposts.py
File metadata and controls
41 lines (31 loc) · 1.19 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
import random
import datetime
# Define brand keywords and templates
keywords = ["innovation", "sustainability",
"quality", "design", "customer satisfaction"]
templates = [
"Discover the power of {keyword} with our latest products!",
"Experience {keyword} like never before with our brand!",
"Our commitment to {keyword} sets us apart from the competition.",
"Unlock the secret to {keyword} with our cutting-edge solutions!",
"We're proud to be a leader in {keyword} - find out why our customers love us!",
]
# Generate a social media post
def generate_post():
keyword = random.choice(keywords)
template = random.choice(templates)
post = template.format(keyword=keyword)
return post
# Schedule social media posts
def schedule_posts(days, frequency):
today = datetime.date.today()
for day in range(days):
post_date = today + datetime.timedelta(days=day)
for _ in range(frequency):
post = generate_post()
print(f"[{post_date}] - {post}")
# Customize the number of days and post frequency per day
days = 30
frequency = 2
# Run the scheduler
schedule_posts(days, frequency)