コード例 #1
0
        print('Song successfully read with few errors!')
    else:
        print('**WARNING**: Your song contains many errors. Please check the following:'
              '\n- All your notes are within octaves 4 and 6. If not, try again with an octave shift.'
              '\n- Your song is free of typos. Please check this website for full instructions: '
              'https://sky.bloomexperiment.com/t/summary-of-input-modes/403')
    print('\nPlease fill song info or press ENTER to skip:')

    song_title = input('Song title (also used for the file name): ')
    if song_title == '':
        song_title = 'untitled'
    original_artists = input('Original artist(s): ')
    transcript_writer = input('Transcribed by: ')

    # ===== Renders the song
    mysong.set_title(song_title)
    mysong.set_headers(original_artists, transcript_writer, song_key)

    if RenderModes.HTML in ENABLED_MODES:
        html_path = os.path.join(SONG_DIR_OUT, song_title + '.html')
        html_path = mysong.write_html(html_path, CSS_MODE, CSS_PATH)

        if html_path != '':
            print('============================================================')
            print('Your song in HTML is located at:', html_path)

    if RenderModes.SVG in ENABLED_MODES:
        svg_path0 = os.path.join(SONG_DIR_OUT, song_title + '.svg')
        filenum, svg_path = mysong.write_svg(svg_path0, CSS_MODE, CSS_PATH)

        if svg_path != '':