def conditionally_save_pdf(): save = raw_input('save pdf? ') if save.lower() == 'y': next_file_number = get_next_file_number() next_file_name = 'profusion-%s.pdf' % str(next_file_number).zfill(2) next_full_file_name = os.path.join(output_directory, next_file_name) lilytools.save_pdf_as(next_full_file_name) print('saved as %s.' % next_file_name)
def apply_sketch_footer(score): lilypond_file = score.lilypond_file footer_string = 'désir - profusion - ' next_file_number = get_next_file_number() footer_string += str(next_file_number) footer_markup = Markup(r'\fill-line { "%s" }' % footer_string) lilypond_file.paper.oddFooterMarkup = footer_markup lilypond_file.paper.evenFooterMarkup = footer_markup