示例#1
0
                      help="read parameters from FILE (e.g. params.ini)", metavar="FILE")
    parser.add_argument("-i", "--input-path", help="path to x-plane scenery", metavar="PATH", default=None)
    #parser.add_argument("-d", "--dsf-file", help="path to x-plane dsf file", metavar="FILE")
    parser.add_argument("-o", "--output-path", help="path to fg scenery", metavar="PATH")
    parser.add_argument("-n", "--no-blender", action="store_true", help="don't run blender", default=False)
    parser.add_argument("-d", "--flip-DDS", action="store_true", help="flip DDS textures", default=False)
    parser.add_argument("-p", "--convert-DDS-to-PNG", action="store_true", help="convert DDS textures to PNG", default=False)
    parser.add_argument("-e", "--no-elev", action="store_true", help="don't probe elevation", default=False)
#    parser.add_argument("-c", dest="c", action="store_true", help="do not check for overlapping with static objects")
#    parser.add_argument("-u", dest="uninstall", action="store_true", help="uninstall ours from .stg")
    parser.add_argument("-l", "--loglevel", help="set loglevel. Valid levels are VERBOSE, DEBUG, INFO, WARNING, ERROR, CRITICAL")
    args = parser.parse_args()
    
    if args.filename is not None:
        parameters.read_from_file(args.filename)
    parameters.set_loglevel(args.loglevel)  # -- must go after reading params file

stats = Stats()
# get base from dsf path
#splitted = args.dsf_file.split(os.sep)
#if splitted[-3] != "Earth nav data":
#    logging.error("expected 'Earth nav data', got %s" % splitted[-3])
#    sys.exit(-1)
if False:
#    args.input_path = "/home/tom/fgfs/scenery/convert/EDDM/EDDM_4_0"
    args.input_path = "/home/tom/fg/scenery/convert/KaiTak_9dragons"
    #args.input_path = "/home/tom/fgfs/scenery/convert/OZ/YMML/YMML Melbourne (ISDG)"
    #args.input_path = "/home/tom/fgfs/scenery/convert/OZ/YMML/YMML Melbourne (ISDG)"
    
    #args.input_path="/home/tom/fg/scenery/convert/Kaitak/Kai_Tak"
#    args.output_path="/media/home/tom/daten/fgfs/fg_scenery/Scenery-devel"
    
    #logger = logging.getLogger()
    
    #logging.basicConfig(level=logging.INFO)
    logging.basicConfig(level=logging.WARNING)
    logger.debug("hello")
    
    parser = argparse.ArgumentParser(description="Convert X-plane gateway scenery package to FlightGear")
    parser.add_argument("-i", "--input-path", help="path to x-plane scenery", metavar="PATH", default=None)
    parser.add_argument("-o", "--output-path", help="path to fg scenery", metavar="PATH")
   
    parser.add_argument("-e", "--no-elev", action="store_true", help="don't probe elevation", default=False)
    parser.add_argument("-u", dest="uninstall", action="store_true", help="uninstall ours from .stg")
    parser.add_argument("-l", "--loglevel", help="set loglevel. Valid levels are VERBOSE, DEBUG, INFO, WARNING, ERROR, CRITICAL")
    args = parser.parse_args() 
    
    if args.loglevel:
        parameters.set_loglevel(args.loglevel)
    else:
        parameters.set_loglevel("WARNING")
        
    if args.input_path:
        parameters.INPUT_PATH = args.input_path
        inputfilename = args.input_path
    else:
        parameters.INPUT_PATH = "EDLM.txt"
    if args.output_path:
        parameters.PATH_TO_OUTPUT = args.output_path
   
    main()
示例#3
0
                        "--no-elev",
                        action="store_true",
                        help="don't probe elevation",
                        default=False)
    parser.add_argument("-u",
                        dest="uninstall",
                        action="store_true",
                        help="uninstall ours from .stg")
    parser.add_argument(
        "-l",
        "--loglevel",
        help=
        "set loglevel. Valid levels are VERBOSE, DEBUG, INFO, WARNING, ERROR, CRITICAL"
    )
    args = parser.parse_args()

    if args.loglevel:
        parameters.set_loglevel(args.loglevel)
    else:
        parameters.set_loglevel("WARNING")

    if args.input_path:
        parameters.INPUT_PATH = args.input_path
        inputfilename = args.input_path
    else:
        parameters.INPUT_PATH = "EDLM.txt"
    if args.output_path:
        parameters.PATH_TO_OUTPUT = args.output_path

    main()
示例#4
0
                        action="store_true",
                        help="don't probe elevation",
                        default=False)
    #    parser.add_argument("-c", dest="c", action="store_true", help="do not check for overlapping with static objects")
    #    parser.add_argument("-u", dest="uninstall", action="store_true", help="uninstall ours from .stg")
    parser.add_argument(
        "-l",
        "--loglevel",
        help=
        "set loglevel. Valid levels are VERBOSE, DEBUG, INFO, WARNING, ERROR, CRITICAL"
    )
    args = parser.parse_args()

    if args.filename is not None:
        parameters.read_from_file(args.filename)
    parameters.set_loglevel(
        args.loglevel)  # -- must go after reading params file

stats = Stats()
# get base from dsf path
#splitted = args.dsf_file.split(os.sep)
#if splitted[-3] != "Earth nav data":
#    logging.error("expected 'Earth nav data', got %s" % splitted[-3])
#    sys.exit(-1)
if False:
    #    args.input_path = "/home/tom/fgfs/scenery/convert/EDDM/EDDM_4_0"
    args.input_path = "/home/tom/fg/scenery/convert/KaiTak_9dragons"
    #args.input_path = "/home/tom/fgfs/scenery/convert/OZ/YMML/YMML Melbourne (ISDG)"
    #args.input_path = "/home/tom/fgfs/scenery/convert/OZ/YMML/YMML Melbourne (ISDG)"

    #args.input_path="/home/tom/fg/scenery/convert/Kaitak/Kai_Tak"
    #    args.output_path="/media/home/tom/daten/fgfs/fg_scenery/Scenery-devel"