#!/usr/bin/env bash
#-------------------------------------------------------------------------------
# Copyright (C) 2012-2019 British Crown (Met Office) & Contributors.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose 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, either version 3 of the License, or
# (at your option) any later version.
#
# Rose 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 Rose. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
# NAME
#     rose namelist-dump
#
# SYNOPSIS
#     rose-namelist-dump [OPTIONS] [FILE ...]
#
# DESCRIPTION
#     Convert namelist files into a Rose application configuration snippet.
#     Each argument should be the path to an empty file or a file containing
#     Fortran namelist groups. A `-` can be used once in the argument list to
#     specify the standard input. If no argument is given, it assumes the
#     standard input is specified. Where possible, use relative path for file
#     names, as the file names appear as-specified in the generated
#     configuration.
#
# OPTIONS
#     --case=MODE
#         Output names in lower case (`MODE="upper"`), upper case
#         (`MODE="lower"`)
#         or unchanged (`default`).
#     --lower, -l
#         Shorthand for `--case=lower`.
#     --output=FILE, -o FILE
#         The name of the file for dumping the output. Default is `-`, i.e. the
#         standard output.
#     -u, --upper
#         Shorthand for `--case=upper`.
#-------------------------------------------------------------------------------
exec python2 -m rose.namelist_dump "$@"
