From 749162188d5eb253497db6573a89b0ab8e00244a Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 13 Mar 2012 21:38:37 +0100 Subject: [PATCH] Add fonction to list bills to download --- weboob/applications/boobill/boobill.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/weboob/applications/boobill/boobill.py b/weboob/applications/boobill/boobill.py index a73d3b60..b687cc0a 100644 --- a/weboob/applications/boobill/boobill.py +++ b/weboob/applications/boobill/boobill.py @@ -97,3 +97,23 @@ class Boobill(ReplApplication): for backend, history in self.do(do, backends=names): self.format(history) self.flush() + + def do_bills(self, id): + """ + bills Id + + Get the list of bills documents + """ + + id, backend_name = self.parse_id(id) + if not id: + print >>sys.stderr, 'Error: please give an subscription ID (hint: use subscriptions command)' + return 2 + names = (backend_name,) if backend_name is not None else None + + def do(backend): + return backend.iter_bills(id) + + for backend, date in self.do(do, backends=names): + self.format(date) + self.flush()