Parser#
This is the ICalParser instance.
Constructors#
Methods#
- class Parser
- add_line(str: str | None = None) Component | None#
Add a line at one time into the
Parseruntil the parsing is complete andComponentwill be returned.Added in version 1.0.
- Parameters:
str – A line of string representation of the
Component
- clean() Component | None#
We won’t get a clean exit if some components did not have an “END” tag. Clear off any component that may be left in the list.
Added in version 1.0.
- get_line(func: Callable[[list[int], Any], str], user_data: Any = None) str#
Given a line generator function, returns a single iCal content line.
Added in version 1.0.
- Parameters:
func – A line generator function
user_data – The data given to
func
- get_state() ParserState#
Gets the state of the target parser.
Added in version 1.0.
- parse(func: Callable[[list[int], Any], str], user_data: Any = None) Component#
icalparser_parse takes a string that holds the text ( in RFC 2445 format ) and returns a pointer to an
Component. The caller owns the memory.funcis a pointer to a function that returns one content line per invocation.Added in version 1.0.
- Parameters:
func – The function used to parse
user_data – The data given to
func