pology.sieve

Package pology :: Module sieve |

# Module sieve

Helpers for catalog sieves.

Pology's `posieve` script processes catalogs with "sieves": objects to which catalog entries are fed one by one, possibly with finalization phase at the end. This module contains some common helpers which are used by many sieves.

Author: Chusslove Illich (Часлав Илић) <caslav.ilic@gmx.net>

License: GPLv3

Classes
| SieveError Base exception class for sieve errors with special meaning.
| SieveMessageError Exception for single messages.
| SieveCatalogError Exception for single catalogs.

Functions
set of strings |
parse_sieve_flags(msg) Extract sieve flags embedded in manual comments. |
add_param_lang(p, appx=None) Add `lang` parameter to sieve parameters. |
add_param_env(p, appx=None) Add `env` parameter to sieve parameters. |
add_param_accel(p, appx=None) Add parameter `accel` to sieve parameters. |
add_param_markup(p, appx=None) Add parameter `markup` to sieve parameters. |
add_param_filter(p, intro=None) Add `filter` parameter to sieve parameters. |
add_param_poeditors(p) Add parameters for opening messages in editors to sieve parameters. |
add_param_entdef(p) Add `entdef` parameter to sieve parameters. |
add_param_spellcheck(p) Add parameters for spell checking to sieve parameters. |

Variables
| __package__ = ``'``pology``'``

Function Details

### parse_sieve_flags(msg) |
Extract sieve flags embedded in manual comments. Sieve flags are put into manual comments with the following syntax:
       # |, flag1, flag2, ...
Some sieves will define certain sieve flags by which their behavior can be altered on a particular message. Parameters: `msg` (Message) - message to parse Returns: set of strings parsed flags

### add_param_lang(p, appx=None) |
Add `lang` parameter to sieve parameters. Parameters: `appx` (string) - one or more trailing paragraphs for the parameter description

### add_param_env(p, appx=None) |
Add `env` parameter to sieve parameters. Parameters: `appx` (string) - one or more trailing paragraphs for the parameter description

### add_param_accel(p, appx=None) |
Add parameter `accel` to sieve parameters. Parameters: `appx` (string) - one or more trailing paragraphs for the parameter description

### add_param_markup(p, appx=None) |
Add parameter `markup` to sieve parameters. Parameters: `appx` (string) - one or more trailing paragraphs for the parameter description

### add_param_filter(p, intro=None) |
Add `filter` parameter to sieve parameters. Parameters: `intro` (string) - first paragraph for the parameter description