#!/usr/bin/python3
#
#  Copyright (C) 2014 Canonical Ltd.
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; version 3 of the License.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.

from clickreviews import frameworks
import sys


def main(filename=None):
    frameworks.get_frameworks_file(filename)

if __name__ == '__main__':
    try:
        filename = None
        if len(sys.argv) > 2:
            print("Usage: %s [file]" % sys.argv[0])
            sys.exit(1)
        elif len(sys.argv) == 2:
            filename = sys.argv[1]
        main(filename)
    except KeyboardInterrupt:
        print('Aborted.', file=sys.stderr)
        sys.exit(1)
