Skip to content

guess

Functions:

Attributes

HUT_NAMES module-attribute

HUT_NAMES = [
    "huette",
    "r[ie]fug[ei]",
    "h[iü]tt[ae]",
    "camona",
    "capanna",
    "cabane",
    "huisli",
]

BIVI_NAMES module-attribute

BIVI_NAMES = ['biwak', 'bivouac', 'bivacco']

BASIC_HOTEL_NAMES module-attribute

BASIC_HOTEL_NAMES = [
    "berghotel",
    "berggasthaus",
    "auberge",
    "gasthaus",
    "berghaus",
]

CAMPING_NAMES module-attribute

CAMPING_NAMES = ['camping', 'zelt']

HOTEL_NAMES module-attribute

HOTEL_NAMES = ['h[oô]tel']

HOSTEL_NAMES module-attribute

HOSTEL_NAMES = ['hostel', 'jugendherberg']

RESTAURANT_NAMES module-attribute

RESTAURANT_NAMES = ['restaurant', 'ristorante', 'beizli']

Classes

Functions

guess_hut_type

guess_hut_type(
    name: str = "",
    default: HutTypeEnum = unknown,
    capacity: CapacitySchema | None = None,
    elevation: float | None = 1500,
    operator: Literal["sac", "dav"] | None = None,
    osm_tag: str | None = "",
    missing_walls: int | None | str = 0,
    open_monthly: OpenMonthlySchema | None = None,
) -> HutTypeSchema

Guess hut type based on some input parameters.

Parameters:

  • name

    (str, default: '' ) –

    hut name

  • default

    (HutTypeEnum, default: unknown ) –

    default type if nothing else fits

  • capacity

    (CapacitySchema | None, default: None ) –

    capacity for a open and closed hut

  • operator

    (Literal['sac', 'dav'] | None, default: None ) –

    who is operating the hut

  • osm_tag

    (str | None, default: '' ) –

    osm toursm tag

  • missing_walls

    (int | None | str, default: 0 ) –

    missing_walls value from refuges.info

  • open_monthly

    (OpenMonthlySchema | None, default: None ) –

    list which month it is open

guess_slug_name

guess_slug_name(
    hut_name: str, max_length: int = 25, min_length: int = 4
) -> str