#!/usr/bin/env python

"""Usage: pontoon size list [--help]

Options:
    -h --help       Show this page.
"""

from pontoon import ui
from pontoon import Command
from pontoon import SizeException


class SizeCommand(Command):

    def list(self):
        available = self.pontoon.size.list()
        ui.message("Available sizes:")
        for s in available:
            ui.message(" - %s" % s.name)
        return 0


if __name__ == '__main__':

    try:
        cmd = SizeCommand(str(__doc__))
        exit(cmd.run())
    except SizeException as e:
        ui.message(str(e))
        exit(1)

    exit(0)
