udapi.core.basewriter module

BaseWriter is the base class for all writer blocks.

class udapi.core.basewriter.BaseWriter(files='-', filehandle=None, docname_as_file=False, encoding='utf-8', newline='\n', overwrite=False, path=None, **kwargs)[source]

Bases: Block

Base class for all writer blocks.

after_process_document(document)[source]

This method is called after each process_document.

before_process_document(document)[source]

This method is called before each process_document.

property file_number

Property with the current file number (1-based).

property filename

Property with the current filehandle.

next_filename()[source]

Go to the next file and retrun its filename.