[weboob] [PATCH 1/1] Add OFX support in boobank
romain at symlink.me
Sun Jan 5 21:21:34 CET 2014
Thank you for your patch. Before applying it, I'd like to have more information.
On 05/Jan - 19:34, Caramdache wrote:
> +class BalanceFormatter(IFormatter):
> + MANDATORY_FIELDS = ('id', 'date', 'raw', 'amount', 'category')
> + balance = Decimal(0)
> + coming = Decimal(0)
> + def start_format(self, **kwargs):
> + account = kwargs['account']
> + self.balance = account.balance
> + self.coming = account.coming
> + def format_obj(self, obj, alias):
> + return u''
> + def flush(self):
> + self.output(u'Balance: %s ' % self.balance)
> + self.output(u'Coming: %s' % self.coming)
This formatter can be used with commands 'history' and 'coming', and can't be
chained with any other formatter.
So it isn't coherent to use this formatter with a command aimed to display an
account history, and which will only display a balance.
Also, you already can get these values with this command:
$ boobank list -f multiline -c id=1234567890123456 -s balance,coming
About the OFX formatter, it seems right.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: Digital signature
More information about the weboob