univention.directory.reports package

class univention.directory.reports.Report(lo, config=None)[source]

Bases: object

create(module, report, objects)[source]

Create a report of objects for the specified module in the specified report type format

exception univention.directory.reports.ReportError[source]

Bases: Exception

class univention.directory.reports.Document(template, header=None, footer=None)[source]

Bases: object

TYPE_LATEX = 0
TYPE_CSV = 1
TYPE_RML = 2
TYPE_UNKNOWN = 3
classmethod get_type(template)[source]
create_source(objects=[])[source]

Create report from objects (list of DNs).

create_pdf(latex_file)[source]

Run pdflatex on latex_file and return path to generated file or None on errors.

create_rml_pdf(rml_file)[source]
univention.directory.reports.connect(userdn=None, password=None, host='localhost', base=None, start_tls=2, access=None)[source]
univention.directory.reports.get_object(module, dn)[source]
univention.directory.reports.cache_object(obj)[source]
univention.directory.reports.connected()[source]
univention.directory.reports.identify(dn)[source]
univention.directory.reports.set_format(format)[source]
class univention.directory.reports.Config(filename='/etc/univention/directory/reports/config.ini')[source]

Bases: configparser.ConfigParser

get_header(module, name=None, suffix='.tex')[source]
get_report_names(module)[source]
get_report(module, name=None)[source]
get_output_dir()[source]

Submodules

univention.directory.reports.admin module

univention.directory.reports.admin.connect(userdn=None, password=None, host='localhost', base=None, start_tls=2, access=None)[source]
univention.directory.reports.admin.get_object(module, dn)[source]
univention.directory.reports.admin.cache_object(obj)[source]
univention.directory.reports.admin.connected()[source]
univention.directory.reports.admin.identify(dn)[source]
univention.directory.reports.admin.set_format(format)[source]

univention.directory.reports.config module

class univention.directory.reports.config.Config(filename='/etc/univention/directory/reports/config.ini')[source]

Bases: configparser.ConfigParser

get_header(module, name=None, suffix='.tex')[source]
get_report_names(module)[source]
get_report(module, name=None)[source]
get_output_dir()[source]

univention.directory.reports.document module

class univention.directory.reports.document.Document(template, header=None, footer=None)[source]

Bases: object

TYPE_LATEX = 0
TYPE_CSV = 1
TYPE_RML = 2
TYPE_UNKNOWN = 3
classmethod get_type(template)[source]
create_source(objects=[])[source]

Create report from objects (list of DNs).

create_pdf(latex_file)[source]

Run pdflatex on latex_file and return path to generated file or None on errors.

create_rml_pdf(rml_file)[source]

univention.directory.reports.error module

exception univention.directory.reports.error.ReportError[source]

Bases: Exception

univention.directory.reports.filter module

univention.directory.reports.filter.filter_add(types, func)[source]
univention.directory.reports.filter.filter_get(prop_type)[source]

univention.directory.reports.interpreter module

class univention.directory.reports.interpreter.Interpreter(base_object, tokens)[source]

Bases: object

run(tokens=[], base_objects=[])[source]
resolve(token, base)[source]
query(token, base)[source]
policy(token, base)[source]
attribute(token, base)[source]

univention.directory.reports.output module

class univention.directory.reports.output.Output(tokens, filename=None, fd=None)[source]

Bases: object

open()[source]
close()[source]
write(tokens=[])[source]

univention.directory.reports.parser module

class univention.directory.reports.parser.Parser(filename=None, data=None)[source]

Bases: object

REGEX_OPEN = re.compile('<@(?P<tag>[^/][^ ]+)( +(?P<attrs>([a-z-0-9]+="[^"]*" *)*)|)@>')
REGEX_CLOSE = re.compile('<@/(?P<tag>[^ ]+) *@>')
START = '<@'
END = '@>'
parse_token(token)[source]
next_token()[source]
tokenize()[source]

univention.directory.reports.report module

class univention.directory.reports.report.Report(lo, config=None)[source]

Bases: object

create(module, report, objects)[source]

Create a report of objects for the specified module in the specified report type format

univention.directory.reports.tokens module

class univention.directory.reports.tokens.Token(name=None, attrs={}, data=None)[source]

Bases: object

class univention.directory.reports.tokens.TextToken(text='')[source]

Bases: univention.directory.reports.tokens.Token

class univention.directory.reports.tokens.TemplateToken(name, attrs={})[source]

Bases: univention.directory.reports.tokens.Token

class univention.directory.reports.tokens.IContextToken(name, attrs, closing)[source]

Bases: univention.directory.reports.tokens.TemplateToken, list

clear()[source]

Remove all items from list.

class univention.directory.reports.tokens.ResolveToken(attrs={}, closing=False)[source]

Bases: univention.directory.reports.tokens.IContextToken

class univention.directory.reports.tokens.QueryToken(attrs={}, closing=False)[source]

Bases: univention.directory.reports.tokens.IContextToken, list

class univention.directory.reports.tokens.HeaderToken(attrs={}, closing=False)[source]

Bases: univention.directory.reports.tokens.IContextToken, list

class univention.directory.reports.tokens.FooterToken(attrs={}, closing=False)[source]

Bases: univention.directory.reports.tokens.IContextToken, list

class univention.directory.reports.tokens.AttributeToken(attrs={}, value='')[source]

Bases: univention.directory.reports.tokens.TemplateToken

class univention.directory.reports.tokens.PolicyToken(attrs={}, value='')[source]

Bases: univention.directory.reports.tokens.TemplateToken

class univention.directory.reports.tokens.DateToken(attrs={}, value='')[source]

Bases: univention.directory.reports.tokens.TemplateToken