Documentation ¶
Overview ¶
Package processors includes all calendar processors available in Icarus.
Icarus parses the incoming calendar data, hands it over to the processor to process data in it and formats the resulting data using an output type
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddAlarmProcessor ¶
type AddAlarmProcessor struct {
// contains filtered or unexported fields
}
The AddAlarmProcessor adds an alarm definition to all selected events
func (*AddAlarmProcessor) Initialize ¶
func (*AddAlarmProcessor) Process ¶
func (a *AddAlarmProcessor) Process(input ical.Calendar, output *ical.Calendar) error
func (*AddAlarmProcessor) SetToolbox ¶
func (a *AddAlarmProcessor) SetToolbox(toolbox Toolbox)
type AddDTStampProcessor ¶
type AddDTStampProcessor struct {
// contains filtered or unexported fields
}
The AddDTStampProcessor adds a DTSTAMP field to all selected events
func (*AddDTStampProcessor) Initialize ¶
func (*AddDTStampProcessor) Process ¶
func (t *AddDTStampProcessor) Process(input ical.Calendar, output *ical.Calendar) error
func (*AddDTStampProcessor) SetToolbox ¶
func (t *AddDTStampProcessor) SetToolbox(toolbox Toolbox)
type AddPropertyProcessor ¶
type AddPropertyProcessor struct {
// contains filtered or unexported fields
}
The AddPropertyProcessor adds an ICS property to each selected event
func (*AddPropertyProcessor) Initialize ¶
func (*AddPropertyProcessor) Process ¶
func (a *AddPropertyProcessor) Process(input ical.Calendar, output *ical.Calendar) error
func (*AddPropertyProcessor) SetToolbox ¶
func (a *AddPropertyProcessor) SetToolbox(toolbox Toolbox)
type BaseProcessor ¶
type BaseProcessor interface { // Initialize creates a new subcommand for the argparse parser. Initialize(parser *argparse.Parser) (*argparse.Command, error) // SetToolbox sets the toolbox that can be used by the processor SetToolbox(toolbox Toolbox) // Process processes the incoming calendar and fills the output calendar Process(input ical.Calendar, output *ical.Calendar) error }
The BaseProcessor is the interface for all Icarus processors
func GetProcessors ¶
func GetProcessors() []BaseProcessor
GetProcessors returns a list of enabled processors
type ConvertAllDayProcessor ¶
type ConvertAllDayProcessor struct {
// contains filtered or unexported fields
}
The ConvertAllDayProcessor converts all-day events to timed events or vice versa
func (*ConvertAllDayProcessor) Initialize ¶
func (*ConvertAllDayProcessor) Process ¶
func (c *ConvertAllDayProcessor) Process(input ical.Calendar, output *ical.Calendar) error
func (*ConvertAllDayProcessor) SetToolbox ¶
func (c *ConvertAllDayProcessor) SetToolbox(toolbox Toolbox)
type DeletePropertyProcessor ¶
type DeletePropertyProcessor struct {
// contains filtered or unexported fields
}
The DeletePropertyProcessor deletes an ICS property from all selected events
func (*DeletePropertyProcessor) Initialize ¶
func (*DeletePropertyProcessor) Process ¶
func (d *DeletePropertyProcessor) Process(input ical.Calendar, output *ical.Calendar) error
func (*DeletePropertyProcessor) SetToolbox ¶
func (d *DeletePropertyProcessor) SetToolbox(toolbox Toolbox)
type FilterProcessor ¶
type FilterProcessor struct {
// contains filtered or unexported fields
}
The FilterProcessor filters the calendar for selected events
func (*FilterProcessor) Initialize ¶
func (*FilterProcessor) Process ¶
func (f *FilterProcessor) Process(inputCalendar ical.Calendar, outputCalendar *ical.Calendar) error
func (*FilterProcessor) SetToolbox ¶
func (f *FilterProcessor) SetToolbox(toolbox Toolbox)
type PrintProcessor ¶
type PrintProcessor struct {
// contains filtered or unexported fields
}
The PrintProcessor simply outputs the input calendar
func (*PrintProcessor) Initialize ¶
func (*PrintProcessor) Process ¶
func (f *PrintProcessor) Process(inputCalendar ical.Calendar, outputCalendar *ical.Calendar) error
func (*PrintProcessor) SetToolbox ¶
func (f *PrintProcessor) SetToolbox(toolbox Toolbox)
type Toolbox ¶
type Toolbox struct { // TextSelectorPattern is the user specified regexp pattern to select events by TextSelectorPattern *regexp.Regexp // TextSelectorProps is a list of property names that are checked for the selector TextSelectorProps []string // DateRangeSelectorStart is the start of a range of dates events have to match DateRangeSelectorStart time.Time // DateRangeSelectorEnd is the end of a range of dates events have to match DateRangeSelectorEnd time.Time }
A Toolbox of common functions
func (Toolbox) EventMatchesSelector ¶
EventMatchesSelector checks if the given event matches the configured filter