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: exceptions.Exception

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

Bases: object

TYPE_CSV = 1
TYPE_LATEX = 0
TYPE_RML = 2
TYPE_UNKNOWN = 3
_Document__append_file(fd, filename, obj=None)
_Document__check_files()
_Document__create_tempfile()
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]
create_source(objects=[])[source]

Create report from objects (list of DNs).

classmethod get_type(template)[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_report_entry(module, name=None)[source]

Find the correct internal report entry for a given a module and a report name.

_guess_path(directory, fileName, alternativePath='')[source]

Guess the correct path for a given template file. Possible paths: (1) directory/<language>/fileName (2) directory/fileName (3) alternativePath

get_header(module, name=None, suffix='.tex')[source]
get_report(module, name=None)[source]
get_report_names(module)[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.cache_object(obj)[source]
univention.directory.reports.admin.get_object(module, dn)[source]
univention.directory.reports.admin.set_format(format)[source]
univention.directory.reports.admin.identify(dn)[source]
univention.directory.reports.admin.connected()[source]

univention.directory.reports.config module

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

Bases: ConfigParser.ConfigParser

_get_report_entry(module, name=None)[source]

Find the correct internal report entry for a given a module and a report name.

_guess_path(directory, fileName, alternativePath='')[source]

Guess the correct path for a given template file. Possible paths: (1) directory/<language>/fileName (2) directory/fileName (3) alternativePath

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

univention.directory.reports.document module

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

Bases: object

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]
TYPE_CSV = 1
TYPE_LATEX = 0
TYPE_RML = 2
TYPE_UNKNOWN = 3
_Document__append_file(fd, filename, obj=None)
_Document__check_files()
_Document__create_tempfile()

univention.directory.reports.error module

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

Bases: exceptions.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]
_query_recursive(objects, attr, module, filter=None, regex=None)[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

_create_dir()[source]
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 = <_sre.SRE_Pattern object>
REGEX_CLOSE = <_sre.SRE_Pattern object>
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]
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