Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from collections import OrderedDict
from .plugins import lines
OPTIONS_DEFAULT = {
'remove_whitespace': False,
'remove_accents': False,
'lowercase': False,
'currency': 'EUR',
'date_formats': [],
'languages': [],
'decimal_separator': '.',
'replace': [], # example: see templates/fr/fr.free.mobile.yml
}
PLUGIN_MAPPING = {
'lines': lines
}
class InvoiceTemplate(OrderedDict):
"""
Represents single template files that live as .yml files on the disk.
Methods
-------
prepare_input(extracted_str)
Input raw string and do transformations, as set in template file.
matches_input(optimized_str)
See if string matches keywords set in template file
parse_number(value)
Parse number, remove decimal separator and add other options
parse_date(value)
Parses date and returns date after parsing