jinks_widgets.trains.idfm¶
This file contains the large weather widget class.
Classes
Class defining the station Île-de-France mobilités widget which shows the upcoming departures in a given station/stop. |
- class jinks_widgets.trains.idfm.StationIDFm¶
Bases:
objectClass defining the station Île-de-France mobilités widget which shows the upcoming departures in a given station/stop.
- width: int = 6¶
- height: int = 8¶
- color = 'BWG'¶
- font_sizes = {40: 30}¶
- known_lines = {'C01739': 'J', 'C01740': 'L', 'C01742': 'A'}¶
- static data(token, station_id, line_id=None, direction_name=None, destination_name=None)¶
Get the station departure traffic data.
- Return type:
list[TrafficData]
- classmethod display(density, widget_data, title=None, line_id=None, direction_name=None, destination_name=None, min_minutes=0.0, max_minutes=None, destination_replacements=None, favourites=None)¶
Get the station departure traffic image.
- Return type:
Image
- static filter(departure, line_id=None, direction_name=None, destination_name=None, min_minutes=0.0, max_minutes=None)¶
- Return type:
bool
- classmethod identify_favourite(departure, favourites)¶
Identify if departure is favourite.
- Return type:
bool
- weekdays: dict[str, tuple[int]] = {'friday': (4,), 'monday': (0,), 'saturday': (5,), 'sunday': (6,), 'thursday': (3,), 'tuesday': (1,), 'wednesday': (2,), 'weekdays': (0, 1, 2, 3, 4), 'weekend': (5, 6)}¶
- classmethod parse_week(str_input)¶
- Return type:
tuple[int]
- static is_time_match(schedule_time, hour=None, minute=None, second=None, delta_time=datetime.timedelta(0))¶
Check if a schedule time matches the specified criteria within delta_time tolerance.
- Parameters:
schedule_time (
datetime) – The time from your schedule to checkhour (
int|None) – Optional hour to match (0-23)minute (
int|None) – Optional minute to match (0-59)second (
int|None) – Optional second to match (0-59)delta_time (
timedelta) – Time tolerance (e.g., timedelta(minutes=5))
- Return type:
bool- Returns:
True if the schedule time matches the criteria, False otherwise