API

Module holding a class that computes the mask based on a list of beginning / closing tags as well as classes derived from this class meant to process Python and Doxygen-documented files.

DegrotesqueBeginEndMarker

Bases: DegrotesqueMarker

A class that returns the mask based on a set of opening / closing tags.

The class is initialised with a list of pairs consiting of the opening / closing markers, e.g. for doxygen-documented files, items gets a pair consisting of '/*' and '/' as well as one consisting of '///' and '\n'.

Masks all parts of a given document that are not within the opening / closing tags.

get_extensions()

Returns the extensions of file types that can be processed using this marker.

Returns:
  • List[str]

    A list of extensions

get_mask(document, to_skip=None)

Returns a string where all text between each of the given begin/end-string pairs is masked (set to '1') and everything else is not masked (set to '0').

Parameters:
  • document (str) –

    The markdown document (contents) to process

  • to_skip (List[str], default: None ) –

    List of elements to skip (HTML/SGML/XML)

Returns:
  • str

    Annotation of the markdown document.

DegrotesqueDoxygenMarker

Bases: DegrotesqueBeginEndMarker

A class that returns the mask for a doxygen-documented document.

Everything is masked despite doxygen comments, excluding links.