コード例 #1
0
def main():
    """Do the actual work of the script"""
    print('')
    print('buildglyphimages.py,')
    print('Part of lilyglyphs.')
    print('')
    
    # set CWD and ensure the necessary subdirs are present
    check_paths()
    print('')

    # load and parse input file
    lg.read_input_file(in_file)
    read_entries()
    print('')

    # generate LilyPond source files for each command
    # and compile them
    write_lily_src_files()
    print('')
    lg.compile_lily_files()
    print('')
    
    # remove intermediate files and move pdfs to pdf directory
    lg.cleanup_lily_files()
    print('')
    
    # generate latex commands and example code
    # and write them to the output file
    lg.generate_latex_commands()
    print('')
    write_latex_file()
コード例 #2
0
def main():
    """Do the actual work of the script"""
    print ""
    print "buildglyphimages.py,"
    print "Part of lilyglyphs."
    print ""

    # set CWD and ensure the necessary subdirs are present
    check_paths()
    print ""

    # load and parse input file
    lg.read_input_file(in_file)
    read_entries()
    print ""

    # generate LilyPond source files for each command
    # and compile them
    write_lily_src_files()
    print ""
    lg.compile_lily_files()
    print ""

    # remove intermediate files and move pdfs to pdf directory
    lg.cleanup_lily_files()
    print ""

    # generate latex commands and example code
    # and write them to the output file
    lg.generate_latex_commands()
    print ""
    write_latex_file()
コード例 #3
0
def main(input_file):
    lg.check_lilyglyphs_root()
    os.chdir(lg.dir_stash)
    if not os.path.exists('emmentaler'):
        os.mkdir('emmentaler')
    os.chdir('emmentaler')
    lg.read_input_file(input_file)
    read_entries()
    
    lg.generate_latex_commands()
    
    lg.write_latex_file('emmentaler/newGlyphCommands.tex')
コード例 #4
0
def main(argv):
    global flag_force, definitions_file_name
    short_options = 'i:'
    long_options = []
    long_options.append('input=')
    try:
        opts, args = getopt.getopt(argv, short_options, long_options)
        for opt, arg in opts:
            if opt in ("-i",  "--input"):
                lg.input_files.append(arg)
            else:
                usage()
                sys.exit(2)
    except getopt.GetoptError:
        usage()
        sys.exit(2)

    # Do the actual work of the script
    print ''
    print 'buildglyphimages.py,'
    print 'Part of lilyglyphs.'

    print ''
    check_paths()

    for input_file_name in lg.input_files:
        print ''
        lg.read_input_file('definitions/' + input_file_name)

        basename, dummy = os.path.splitext(input_file_name)
        lg.cat_subdir = basename + '/'

        print ''
        read_entries()

        print ''
        write_lily_src_files()

        print ''
        lg.compile_lily_files()

        print ''
        lg.generate_latex_commands()

    print ''
    lg.cleanup_lily_files()

    print ''
    write_latex_file()
コード例 #5
0
def main(input_file):
    """Do the main work of the script"""

    in_dir, in_file = os.path.split(input_file)
    os.chdir(in_dir)

    # load and parse input file
    lg.read_input_file(in_file)
    read_entries()

    # generate LaTeX commands and save them to output file
    # (will be a .tex sibling of the input file)
    lg.generate_latex_commands()
    out_file, out_ext = os.path.splitext(input_file)
    lg.write_latex_file(os.path.join(os.getcwd(), out_file + '.tex'))
コード例 #6
0
def main(input_file):
    """Do the main work of the script"""

    in_dir, in_file = os.path.split(input_file)
    os.chdir(in_dir)

    # load and parse input file
    lg.read_input_file(in_file)
    read_entries()

    # generate LaTeX commands and save them to output file
    # (will be a .tex sibling of the input file)
    lg.generate_latex_commands()
    out_file, out_ext = os.path.splitext(input_file)
    lg.write_latex_file(os.path.join(os.getcwd(), out_file + ".tex"))