Output Functions

aims.output.efj(duties: tuple[Duty, ...]) str

Transform to text with the electronic Flight Journal (eFJ) scheme.

As well as converting the duty, sector and crew information into the correct form, a night calculation is carried out (assuming that standard three letter codes are used for the airports).

Parameters:

duties – A tuple of aims.data_structures.Duty objects, as output by aims.parse.parse().

Returns:

Text with the eFJ scheme

aims.output.ical(duties: tuple[Duty, ...], ade: tuple[AllDayEvent, ...]) str

Transform to iCalendar format.

Parameters:
Returns:

Text in iCalendar format

aims.output.csv(duties: tuple[Duty, ...]) str

Transform to comma separated values with Excel flavour.

The fields provided are ‘Off Blocks’, ‘On Blocks’, ‘Duration’, ‘Night’, ‘Origin’, ‘Destination’, ‘Registration’, ‘Type’, ‘Captain’, and ‘Crew’.

Parameters:

duties – A tuple of aims.data_structures.Duty objects, as output by aims.parse.parse().

Returns:

Text in Excel flavoured CSV format.

aims.output.roster(duties: tuple[Duty, ...]) str

Transform to text format suitable for emacs diary and FTL prediction, with times in UK local.

Output looks something like this:

11/02/2024 06:00-12:34 BRS-ADTY-GVA-BRS 3:20/6:34
26/02/2024 06:35-15:00 BRS-AMS-BRS-GLA-BRS 5:15/8:25
27/02/2024 04:30-12:30 ESBY 0:00/8:00
28/02/2024 08:00-16:00 OLAD 0:00/8:00

The two durations at the end of the line are the expected block hours and expected duty hours.

Parameters:

duties – A tuple of aims.data_structures.Duty objects, as output by aims.parse.parse().

Returns:

Text suitable for emacs diary.