def generate_vim(filename,error_checking): output_filename = strip_filename(filename) + '.vim' print 'Generating vim file %s\n' % output_filename ah = Autohighlight(filename) ah.parse() outputter = VimOutputter(error_checking) open(output_filename,'w').write(ah.output(outputter))
def generate_emacs(filename): import os.path output_filename = strip_filename(filename) + '.el' ah = Autohighlight(filename) ah.parse() outputter = EmacsOutputter(os.path.basename(strip_filename(filename))) open(output_filename,'w').write(ah.output(outputter)) print "Wrote %s\n" % output_filename