コード例 #1
0
              '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 != '':
            print('--------------------------------------------------')
            print('Your song in SVG is located in:', SONG_DIR_OUT)
            print('Your song has been split into ' + str(filenum + 1) + ' files '
                                                                        'between ' + os.path.split(svg_path0)[
                      1] + ' and ' + os.path.split(svg_path)[1])