Пример #1
0
)
parser_cut_data.add_argument(
    'planetOSM', help='Full path of the planetOSM file in O5M format'
)
parser_cut_data.set_defaults(func=cut_data)


# script arguments
parser.add_argument(
    '--verbose', action='store_true', default=False,
    help='show verbose execution messages'
)

parser.add_argument(
    '--settings', default='settings.yaml',
    help='path to the settings file, default: settings.yaml'
)


if __name__ == '__main__':
    # parse the args, and call default function
    args = parser.parse_args()

    proj_settings = POSMSettings(args.settings, verbose=args.verbose)
    settings = proj_settings.get_settings()

    # setup logging, has to be after osmext.settings
    logging.config.dictConfig(settings.get('logging'))

    args.func(args)