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')
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'))
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"))
def write_latex_file(): """Composes LaTeX file and writes it to disk""" print('Generate LaTeX file') print(lg.dir_cmd, in_basename) lg.write_latex_file(os.path.join(os.getcwd(), lg.dir_cmd, in_basename + '.tex'))
def write_latex_file(): """Composes LaTeX file and writes it to disk""" print "Generate LaTeX file" print lg.dir_cmd, in_basename lg.write_latex_file(os.path.join(os.getcwd(), lg.dir_cmd, in_basename + ".tex"))
def write_latex_file(): """Composes LaTeX file and writes it to disk""" print 'Generate LaTeX file' lg.write_latex_file('images/newImageGlyphs.tex')