New issue 419: how to extend precanned csv import extract method to add csv 
source to __source__ metadata

Jeff Mondoux:

I have a custom importer to import my banks csv statements, this imported 
inherits from beancount csv importer in which I override the extract\(\) method 
as such:


def extract(self, file, existing_entries=None):

    mapped_account = self.file_account(file)

    entries = super().extract(file, existing_entries)

    for entry in entries:


    return entries


What I can’t figure out with my limited python abilities is how can I add the 
raw csv line to the \_\_**source**\_\_ metadata field so that it can be 
displayed by fava import gui.  I want to avoid rolling my own csv importer 
entirely as the generic csv importer provided by beancount does what I need for 
the most part.  I know I can reread the csv file a second time to append the 
data, but is this the best or only way?

You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To view this discussion on the web visit

Reply via email to