Created
September 23, 2024 08:50
-
-
Save tauffredou/554bc7e429fd83a10d751bb7dbb4efee to your computer and use it in GitHub Desktop.
generate trello headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const colors = ["Crimson", "Cerulean", "Turquoise", "Vermilion", "Indigo", "Lavender", "Periwinkle", "Marigold", "Charcoal", "Magenta", | |
| "Aquamarine", "Amber", "Teal", "Fuchsia", "Saffron", "Emerald", "Coral", "Cobalt", "Sepia", "Olive", "Azure", "Burgundy", "Sage", "Mauve", "Onyx"]; | |
| const startDate = new Date(2024, 4, 20); // 20 May 2024 | |
| const sprintCount = 10 | |
| const firstSprint = 10 | |
| const sprintDurationDays = 14 | |
| for (let index = firstSprint; index < firstSprint + sprintCount; index++) { | |
| endDate = new Date(startDate) | |
| endDate.setDate(endDate.getDate() + 11); | |
| let color = colors[index % colors.length] | |
| let prompt = `/imagine prompt: illustration of cute animal, month ${monthName(startDate)}, ${color} tone --ar 2:1` | |
| console.log(`Goals sprint ${index} (${formatSprintDate(startDate)} - ${formatSprintDate(endDate)}) | |
| ${prompt} | |
| `) | |
| startDate.setDate(startDate.getDate() + sprintDurationDays); | |
| } | |
| function formatSprintDate(d) { | |
| //console.log(d) | |
| const day = String(d.getDate()).padStart(2, '0'); | |
| const month = String(d.getMonth() + 1).padStart(2, '0'); | |
| return `${day}/${month}`; | |
| } | |
| function monthName(d){ | |
| const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; | |
| return monthNames[d.getMonth()]; | |
| }% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment