diff --git a/hanabi-league b/hanabi-league index cca930b..756a8f7 100755 --- a/hanabi-league +++ b/hanabi-league @@ -74,6 +74,13 @@ def subcommand_generate_site(): render_site.render_all() +def subcommand_run(): + subcommand_fetch("all") + subcommand_process_ratings() + subcommand_process_stats() + subcommand_generate_site() + + def get_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser( prog=constants.APP_NAME, @@ -91,6 +98,7 @@ def get_parser() -> argparse.ArgumentParser: subparsers.add_parser('process-ratings', help="Process ratings of all games.") subparsers.add_parser('process-stats', help="Process statistics for all players.") subparsers.add_parser('generate-site', help="Generate the website from the DB.") + subparsers.add_parser('run', help="Run the automatic suite: Fetch + process games and render site.") fetch_parser = subparsers.add_parser('fetch', help='Fetch new data.') fetch_parser.add_argument(dest='target', choices=['all', 'players', 'games', 'game-details'], default='all') @@ -108,7 +116,8 @@ def main(): 'process-ratings': subcommand_process_ratings, 'process-stats': subcommand_process_stats, 'generate-site': subcommand_generate_site, - 'fetch': subcommand_fetch + 'fetch': subcommand_fetch, + 'run': subcommand_run, }[args.command] if args.verbose: