Ejemplo n.º 1
0
def gitHistory(target,revisions,info):
    branch = git_info.getBranch(target)
    response = git_info.resetHead(target,branch)
    print(response)

    forced_width = 0
    forced_height = 0
    for i in range(1,revisions):
        print( '{i}/{revisions} {percent}%'.format( i=i,revisions=revisions,percent=int(100.0*i/revisions) ) )
        if i == 1:
            first = True
        else:
            first = False
        movie = True
        center_text = info

        file_name = createImage(target=target,first=first,index=i,movie=movie,info=center_text,forced_width=forced_width,forced_height=forced_height)
        if first:
            img = Image.open(file_name)
            forced_width = img.size[0]
            forced_height = img.size[1]            

        resetAuthors()
        response = git_info.checkoutRevision(target, 1)
        print(response)
        if 'fatal' in response:
            break

    return branch
Ejemplo n.º 2
0
    msg = '\n                                           ~~(OvO)~~     \n'
    msg += '\nCreating a bird\'s eye view...\n'
    msg += 'Folder = {target}\n'.format(target=target)
    msg += 'Movie = {movie}\n'.format(movie=str(movie))
    if movie:
        msg += 'Revs = {revs}\n'.format(revs=str(revs))
    msg += 'Info = {info}\n'.format(info=str(info))
    msg += '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n'
    msg += '                                                      ><> \n'
    print(msg)

    if not SAVE_TEMP:
        disk.deleteFolder(TEMP_FOLDER)

    if movie:
        branch = ''
        try:
            branch = gitHistory(target, revs, info)
            base = git_info.getBaseRepoName(target)
            make_movie.combine(OUTPUT_FOLDER, base)
            if OPEN_AFTER:
                disk.open(os.path.join(OUTPUT_FOLDER, 'out.mp4'))
        finally:
            response = git_info.resetHead(target, branch)
            print(response)
    else:
        output_file_name = createImage(target=target, info=info)
        if OPEN_AFTER:
            disk.open(output_file_name)