Skip to content

basicconverter

Base class for converters.

BasicConverter

Take care of data common to all BasicConverter classes.

Source code in corpustools/basicconverter.py
25
26
27
28
29
30
31
32
33
34
35
36
37
class BasicConverter:
    """Take care of data common to all BasicConverter classes."""

    def __init__(self, filename: Path):
        """Initialise the BasicConverter class.

        Args:
            filename (str): the path to the file that should be converted
        """
        self.orig = filename
        self.metadata = xslsetter.MetadataHandler(
            filename.with_name(filename.name + ".xsl"), create=True
        )

__init__(filename)

Initialise the BasicConverter class.

Parameters:

Name Type Description Default
filename str

the path to the file that should be converted

required
Source code in corpustools/basicconverter.py
28
29
30
31
32
33
34
35
36
37
def __init__(self, filename: Path):
    """Initialise the BasicConverter class.

    Args:
        filename (str): the path to the file that should be converted
    """
    self.orig = filename
    self.metadata = xslsetter.MetadataHandler(
        filename.with_name(filename.name + ".xsl"), create=True
    )