How to use the invoice2data.extract.plugins.lines function in invoice2data

To help you get started, we’ve selected a few invoice2data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github invoice-x / invoice2data / invoice2data / extract / invoice_template.py View on Github external
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

invoice2data

Python parser to extract data from pdf invoice

MIT
Latest version published 6 months ago

Package Health Score

72 / 100
Full package analysis

Similar packages