-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
147 lines (123 loc) · 3.71 KB
/
config.py
File metadata and controls
147 lines (123 loc) · 3.71 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
from datetime import date, timedelta
ENVIRONMENT = "production"
def _build_travel_windows(today: date | None = None) -> list[dict[str, str]]:
base = today or date.today()
first_start = base + timedelta(days=3)
first_end = min(
first_start + timedelta(days=20),
date(2025, 12, 20) - timedelta(days=1),
) # cap before 2025-12-20
second_start = first_start + timedelta(weeks=6)
second_end = min(
second_start + timedelta(days=24),
date(2026, 2, 3) - timedelta(days=1),
) # cap before 2026-02-03
def _iso(d: date) -> str:
return d.strftime("%Y-%m-%d")
return [
{
"origin": "MUC",
"destination": "BKK",
"start_date": _iso(first_start),
"end_date": _iso(first_end),
},
{
"origin": "BKK",
"destination": "MUC",
"start_date": _iso(second_start),
"end_date": _iso(second_end),
},
]
TRAVEL_WINDOWS = _build_travel_windows()
# Default filters applied when requesting flight offers from Amadeus.
FLIGHT_SEARCH_FILTERS = {
"travel_class": "BUSINESS",
"non_stop": "true",
"included_airline_codes": "TG",
}
# Toggle displaying the price below each rendered seatmap block.
SHOW_SEATMAP_PRICE = False
# Seatmap render style ("compact", "normal", or "both").
SEATMAP_OUTPUT_STYLE = "both"
#SEATMAP_OUTPUT_STYLE = "compact"
#SEATMAP_OUTPUT_STYLE = "normal"
# For compact view
SUPPRESS_COMPACT_SECOND_HEADER = True
# Controls whether highlighted heatmap cells render bold and/or italic.
HEATMAP_EMPHASIS_STYLES = {
"bold": True,
"italic": True,
}
CURRENCY_SYMBOLS = {
"USD": "$",
"EUR": "€",
"GBP": "£",
"JPY": "¥",
"CNY": "¥",
"THB": "฿",
"AUD": "$",
"CAD": "$",
"SGD": "$",
}
ANSI_RESET = "\033[0m"
BORDER_COLORS = {
# semantic tokens; resolved at apply-time by colors.resolve/apply
"default": "fg_bright_black",
"best": "fg_green",
"worst": "fg_red",
}
# 🟦 / 🟪 / 🟥 / 🟧 / 🟨 / 🟩 / 🟫
STATUS_SYMBOLS = {
"AVAILABLE": "🟦",
"OCCUPIED": "❌",
"BLOCKED": "⬛",
}
WINDOW_AVAILABLE_SYMBOL = "🟩"
HIGHLIGHT_CHARACTERISTIC_CODES = {"H"} # seats with these characteristic codes get a highlight when available
HIGHLIGHT_AVAILABLE_SYMBOL = "🟨"
COMPACT_BACKGROUND_COLORS = {
"AVAILABLE_WINDOW": "bg_dark_green",
"AVAILABLE_HIGHLIGHT": "bg_yellow",
"AVAILABLE": "bg_dark_blue",
"OCCUPIED": "",
"BLOCKED": "",
"UNKNOWN": "bg_white",
}
COMPACT_SYMBOLS = {
"AVAILABLE_WINDOW": " ",
"AVAILABLE_HIGHLIGHT": " ",
"AVAILABLE": " ",
"OCCUPIED": "✘",
"BLOCKED": "✘",
"UNKNOWN": " ",
}
COMPACT_SYMBOL_COLORS = {
"AVAILABLE_WINDOW": "",
"AVAILABLE_HIGHLIGHT": "",
"AVAILABLE": "",
"OCCUPIED": "fg_red",
"BLOCKED": "fg_grey",
"UNKNOWN": "",
}
HEATMAP_SYMBOLS = {
"min": "🟩",
"default": "🟨",
"max": "🟥",
}
HEATMAP_COLORS = {
"min": BORDER_COLORS["best"],
"default": "fg_yellow",
"max": BORDER_COLORS["worst"],
}
HEATMAP_HEADER_COLOR = "fg_grey"
STATIC_LABELS = {
"compact_seatmap_heading": "\nSeatmaps:\n",
"normal_seatmap_heading": "\nSeatmaps (normal view):\n",
"availability_heading": "\nAvailable window seats by date:",
"price_label": "Price",
"no_window_seats": "No window seats",
"roundtrip_window_title": "Round-trip price heatmap (window-seat prices)",
"roundtrip_all_title": "Round-trip price heatmap (all prices, bold+italic = window-seat available)",
"roundtrip_return_prices_title": "Round-trip price heatmap (return prices data)",
"roundtrip_title_template": "Round-trip price heatmap ({outbound_route} + {return_route})",
}