Esempio n. 1
0
        output_directory = os.path.join(outdir, "doc")
        if os.path.exists(output_directory):
            lg.debug("Removing old Verovio C++ output directory")
            shutil.rmtree(output_directory)
        os.mkdir(output_directory)

        vrv.create(schema, output_directory, args.includes)

    if "python" in l_langs.lower():
        import langs.python as py
        output_directory = os.path.join(outdir, "python")
        if os.path.exists(output_directory):
            lg.debug("Removing old Python output directory")
            shutil.rmtree(output_directory)
        os.mkdir(output_directory)
        py.create(schema, output_directory)
        if args.includes:
            py.parse_includes(output_directory, args.includes)

    if "manuscript" in l_langs.lower():
        import langs.manuscript as ms
        output_directory = os.path.join(outdir, "manuscript")
        if os.path.exists(output_directory):
            lg.debug("Removing old Manuscript output directory")
            shutil.rmtree(output_directory)
        os.mkdir(output_directory)
        ms.create(schema, output_directory)

    if "java" in args.lang:
        import langs.java as java
        output_directory = os.path.join(outdir, "java")
Esempio n. 2
0
            if os.path.exists(output_directory):
                lg.debug("Removing old C++ output directory")
                shutil.rmtree(output_directory)
            os.mkdir(output_directory)
            cpp.create(schema, output_directory)
            if args.includes:
                cpp.parse_includes(output_directory, args.includes)

        if "python" in l_langs.lower():
            import langs.python as py
            output_directory = os.path.join(outdir, "python")
            if os.path.exists(output_directory):
                lg.debug("Removing old Python output directory")
                shutil.rmtree(output_directory)
            os.mkdir(output_directory)
            py.create(schema, output_directory)
            if args.includes:
                py.parse_includes(output_directory, args.includes)

        if "manuscript" in l_langs.lower():
            import langs.manuscript as ms
            output_directory = os.path.join(outdir, "manuscript")
            if os.path.exists(output_directory):
                lg.debug("Removing old Manuscript output directory")
                shutil.rmtree(output_directory)
            os.mkdir(output_directory)
            ms.create(schema, output_directory)

    if "java" in args.lang:
        import langs.java as java
        output_directory = os.path.join(outdir, "java")
Esempio n. 3
0
    else:
        tdir = None
        compiled_odd = args.compiled

    cf = codecs.open(compiled_odd, 'r', 'utf-8')
    # sf = codecs.open(args.source,'r', "utf-8")
    # cf = codecs.open(args.customization, 'r', "utf-8")
    
    if not os.path.exists(args.outdir):
        os.mkdir(args.outdir)
    
    schema = MeiSchema(cf, args.outdir)
    
    if "cpp" in args.lang:
        import langs.cplusplus as cpp
        cpp.create(schema)
        if args.includes:
            cpp.parse_includes(args.outdir, args.includes)

    if "python" in args.lang:
        import langs.python as py
        py.create(schema)
        if args.includes:
            py.parse_includes(args.outdir, args.includes)
    
    # clean up tempdir
    if tdir:
        shutil.rmtree(tdir)
    cf.close()

    sys.exit(0)
Esempio n. 4
0
    else:
        tdir = None
        compiled_odd = args.compiled

    cf = codecs.open(compiled_odd, 'r', 'utf-8')
    # sf = codecs.open(args.source,'r', "utf-8")
    # cf = codecs.open(args.customization, 'r', "utf-8")

    if not os.path.exists(args.outdir):
        os.mkdir(args.outdir)

    schema = MeiSchema(cf, args.outdir)

    if "cpp" in args.lang:
        import langs.cplusplus as cpp
        cpp.create(schema)
        if args.includes:
            cpp.parse_includes(args.outdir, args.includes)

    if "python" in args.lang:
        import langs.python as py
        py.create(schema)
        if args.includes:
            py.parse_includes(args.outdir, args.includes)

    # clean up tempdir
    if tdir:
        shutil.rmtree(tdir)
    cf.close()

    sys.exit(0)