diff options
author | Florian Pritz <bluewind@xinu.at> | 2016-07-06 16:16:01 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2016-07-06 16:16:01 +0200 |
commit | 977392aadcb8efea7d00c248f380ef361a7df1f9 (patch) | |
tree | a20671c818ca5a7f60565256cfbebe696bea784f /fb.py | |
parent | aba807b2767b9f04b59f67ec3c56973432bcc690 (diff) |
Add statistics to history output
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.py')
-rwxr-xr-x | fb.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -737,6 +737,12 @@ class FBClient: items = list(items.values()) multipasteItems = list(multipasteItems.values()) + uniqueSize = dict() + for item in items: + uniqueSize[item['hash']] = int(item['filesize']) + + totalSize = sum([v for v in uniqueSize.values()]) + for item in multipasteItems: item['id'] = item['url_id'] item['filename'] = '%s file(s)' % (len(item['items'])) @@ -759,6 +765,11 @@ class FBClient: ] for i in items] print_table(itemsTable) + print("\n") + print("Total sum of your distinct uploads: %s" % (humanize_bytes(totalSize))) + print("Total number of uploads (excluding multipastes): %s" % (len(resp['items']))) + print("Total number of multipastes: %s" % (len(multipasteItems))) + def display_version(self): print(self.version) |