event.utils.guidle
Attributes
Classes
Base class for parsing guidle exports containing general helpers. |
|
Represents a whole guidle export. |
|
Represents a single offer containing some description and dates. |
|
Represents a single schedule date of an offer. |
Module Contents
- class event.utils.guidle.GuidleBase(root: lxml.etree._Element)[source]
Base class for parsing guidle exports containing general helpers.
- find(path: str, root: _Element | None = None) list[lxml.etree._Element] [source]
Gets the elements with the given path.
- get(path: str, root: _Element | None = None, joiner: str = ' ', parser: None = None) str [source]
- get(path: str, root: _Element | None = None, joiner: str = ' ', *, parser: Callable[[str], _T]) _T | None
Returns the text of the elements with the given path.
Allows to specifiy a joining character and optionally a parser. If no parser is given, the text is HTML-cleaned.
- class event.utils.guidle.GuidleExportData(root: lxml.etree._Element)[source]
Bases:
GuidleBase
Represents a whole guidle export.
- offers() Iterator[GuidleOffer] [source]
- class event.utils.guidle.GuidleOffer(root: lxml.etree._Element)[source]
Bases:
GuidleBase
Represents a single offer containing some description and dates.
- image(size: str) tuple[str, str] | tuple[None, None] [source]
Returns the image url for the offer with the given size, together with the filename, or (None, None).
- pdf() tuple[str, str] | tuple[None, None] [source]
Returns the first attachment that is a pdf, together with the filename, or (None, None).
- tags(tagmap: Mapping[str, str] | None = None) tuple[set[str], set[str]] [source]
Returns a set of known and a set of unkonwn tags.
- schedules() Iterator[GuidleScheduleDate] [source]