tariochbctools.importers.viseca package
Submodules
tariochbctools.importers.viseca.importer module
- class tariochbctools.importers.viseca.importer.Importer(filepattern: str, account: str)[source]
Bases:
Importer
An importer for Viseca One Card Statement PDF files.
- account(filepath: str) str [source]
Return the account associated with the given file.
The account is used to determine the archival folder for the document. While the interface allows returning different accounts for different documents, normally the returned account is a just a function of the importer instance.
- Parameters:
filepath – Filesystem path to the document being imported.
- Returns:
An account name.
- extract(filepath: str, existing: list[Open | Close | Commodity | Pad | Balance | Transaction | Note | Event | Query | Price | Document | Custom]) list[Open | Close | Commodity | Pad | Balance | Transaction | Note | Event | Query | Price | Document | Custom] [source]
Extract transactions and other directives from a document.
The existing entries list is loaded from the existing ledger file, if the user specified one on the command line. It can be used to supplement the information provided by the document being processed to drive the extraction. For example to derive the prior state of the inventory.
- Parameters:
filepath – Filesystem path to the document being imported.
existing – Entries loaded from the existing ledger.
- Returns:
A list of imported directives extracted from the document.