Skip to content

Commit

Permalink
feat: add "start date" event type with emoji and color
Browse files Browse the repository at this point in the history
  • Loading branch information
dgokcin committed Sep 4, 2024
1 parent a63b13a commit 5ff0f33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Code.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const emojiMap = {
'tamir': '🛠️',
'repair': '🛠️',
'payment': '💸',
'start date': '🏁',
'gas and electricity': '🔌',
};

Expand Down Expand Up @@ -95,6 +96,7 @@ function ColorEvents() {
"paris 2024": /\bparis 2024\b/i,
"randevu": /\brandevu\b/i,
"appointment": /\bappointment\b/i,
"start date": /\bstart date\b/i,
"gas and electricity": /\bgas and electricity\b/i,
"tamir": /\btamir\b/i,
"repair": /\brepair\b/i,
Expand Down Expand Up @@ -123,7 +125,7 @@ function ColorEvents() {
} else if (regexMap["paris 2024"].test(lowerTitle)) {
color = CalendarApp.EventColor.BLUE;
Logger.log("Title: " + title + " - Color to print: BLUE");
} else if (regexMap["randevu"].test(lowerTitle) || regexMap["appointment"].test(lowerTitle) || regexMap["gas and electricity"].test(lowerTitle)) {
} else if (regexMap["randevu"].test(lowerTitle) || regexMap["appointment"].test(lowerTitle) || regexMap["gas and electricity"].test(lowerTitle) || regexMap["start date"].test(lowerTitle)) {
color = CalendarApp.EventColor.GRAY;
Logger.log("Title: " + title + " - Color to print: GRAY");
} else if (regexMap["tamir"].test(lowerTitle) || regexMap["repair"].test(lowerTitle)) {
Expand Down

0 comments on commit 5ff0f33

Please sign in to comment.