varst.utils.substitution module#
- class varst.utils.substitution.Substitution(rst_file: RstFile)#
Bases:
object
- find(text: str) str #
Find substitution definition by substitution text.
- Parameters:
text – The string value of substitution text.
- Returns:
Returns substitution definition if it exists.
- Raises:
KeyError – If substitution definition is not in file.
- update(text: str, data: str) None #
Update substitution definition by using substitution text and data.
- Parameters:
text – The string value of substitution text.
data – The string value of substitution data.
- varst.utils.substitution.substitution_def(text: str, data: str) str #
Create substitution definition by using substitution text and data.
- Parameters:
text – The string value of substitution text.
data – The string value of substitution data.
- Returns:
Returns substitution definition.