Bases: accounting.storage.Storage
Writes a transaction to the ledger file by opening it in ‘ab’ mode and writing a ledger transaction based on the Transaction instance in transaction.
Returns a list of arguments suitable for subprocess.Popen based on self.ledger_bin and self.ledger_file.
Commits any changes to self.ledger_file to the git repository
Delete a transaction from the ledger file.
This method opens the ledger file, loads all lines into memory and looks for the transaction_id, then looks for the bounds of that transaction in the ledger file, removes all lines within the bounds of the transaction and removes them, then writes the lines back to the ledger file.
Exceptions:
Creates a new ledger process with the specified command and returns the output.
Raises an AccountingException-based Exception based on the ledger-cli stderr.
Update a transaction in the ledger file.
Takes a Transaction object and removes the old transaction using transaction.id from the passed Transaction instance and adds transaction to the database.