Skip to content

Commit 0495ece

Browse files
Create daily prompt rotation script for Webwright
This script rotates daily prompts for Webwright based on the day of the year and writes the selected prompt to a file.
1 parent 038a3c6 commit 0495ece

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

rotate_prompts.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import datetime
2+
3+
# List of Webwright prompts to rotate daily
4+
prompts = [
5+
"Build a CI/CD pipeline with Webwright",
6+
"Deploy a Kubernetes cluster using Webwright",
7+
"Automate Docker builds with Webwright",
8+
"Integrate Webwright into GitHub Actions",
9+
"Create a DevOps dashboard with Webwright",
10+
"Generate Python test cases using Webwright",
11+
"Monitor cloud deployments via Webwright"
12+
]
13+
14+
# Pick prompt based on day of year
15+
day_index = datetime.datetime.utcnow().timetuple().tm_yday % len(prompts)
16+
selected_prompt = prompts[day_index]
17+
18+
# Write to file
19+
with open("prompts/daily_prompt.txt", "w") as f:
20+
f.write(f"Prompt of the day ({datetime.date.today()}):\n")
21+
f.write(selected_prompt + "\n")

0 commit comments

Comments
 (0)