#!/usr/bin/python
# Copyright (C) 2008 One Laptop Per Child Association, Inc.
# Licensed under the terms of the GNU GPL v2 or later; see COPYING for details.
#
# written by Douglas Bagnall <douglas@paradise.net.nz>

"""This script reads activity.info from bundle files and reports on
their quality.
"""

import xs_activities
import sys, os

xs_activities.USE_STDERR = True

show_all = '--show-all' in sys.argv
if show_all:
    sys.argv.remove('--show-all')


try:
    directory = sys.argv[1]
    os.stat(directory)
except (IndexError, OSError):
    print __doc__
    print "USAGE: %s DIRECTORY" % sys.argv[0]
    sys.exit(1)

xs_activities.check_all_bundles(directory, show_all)

