[weboob] [PATCH 1/1] Add OFX support in boobank

Romain Bignon romain at symlink.me
Sun Jan 5 21:21:34 CET 2014


Hello,

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 
balance: 1064.91
coming: -508.85

About the OFX formatter, it seems right.

Romain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.symlink.me/pipermail/weboob/attachments/20140105/bdbbc485/attachment.sig>


More information about the weboob mailing list