Пример #1
0
def go():
    davinci = Davinci()
    if davinci.resolve is None:
        return

    davinci.get_current_project()
    if davinci.project is None:
        print('Could not get current DaVinci project')
        return

    flo = VideoFlo()
    project_name = davinci.project.GetName()
    channel = flo.get_channel(project_name)
    if channel is None:
        return

    idea = Idea()
    idea.from_project(project_name, channel)
    if not idea.exists():
        print('Directory for {} not found'.format(project_name))
        return

    args = flo.get_finish_edit_arguments()
    if not args.offline:
        trello = Trello()
        if not trello.lists_exist(['Render'], idea.channel):
            return

        success = trello.move_card(idea, 'Render')
        if not success:
            return

    davinci.export_project(idea)
    update_tag('Render', idea.path)
Пример #2
0
def go():
    flo = VideoFlo()
    args = flo.get_init_arguments()
    channel = Channel(flo.config, args.channel)

    trello = Trello()
    if not trello.lists_exist(STAGES, channel, create=True):
        return

    trello.add_custom_fields(channel)
Пример #3
0
def go():
    flo = VideoFlo()
    args = flo.get_render_arguments()
    channel = Channel(flo.config, args.channel)

    trello = Trello()
    renderable = _get_render_list(channel, trello, args)
    if renderable is None or len(renderable) == 0:
        print('Nothing to render')
        return

    loop(channel, trello, args, renderable)
Пример #4
0
def go():
    flo = VideoFlo()
    idea = Idea()
    idea.read_user_input(flo)
    if not idea.exists():
        print('Directory for {} not found'.format(idea.name))
        return

    davinci = Davinci()
    if davinci.resolve is None:
        return

    davinci.set_project_manager()
    if davinci.project_manager is None:
        return

    is_new = davinci.open_project(idea)
    if davinci.project is None:
        return

    if is_new:
        davinci.import_timeline()
    davinci.workspace_setup()
    davinci.import_files()

    if not idea.offline:
        trello = Trello()
        if not trello.lists_exist(['Finish'], idea.channel):
            return

        success = trello.move_card(idea, 'Finish')
        if not success:
            return

    update_tag('Finish', idea.path)
Пример #5
0
def go():
    flo = VideoFlo()
    idea = Idea()
    idea.read_user_input(flo)

    trello = Trello()
    if not idea.offline:
        if not trello.lists_exist(['Script'], idea.channel):
            return
        card_id, board_id = trello.make_card(idea)
        if card_id is None or board_id is None:
            return

        if not trello.add_filename_to_card(card_id, board_id, idea.name):
            trello.delete_card(card_id)
            return

    idea_directory = idea.make_directory()
    if idea_directory is None:
        if not idea.offline:
            trello.delete_card(card_id)
        return

    idea.make_files()
    idea.make_directories()

    if not idea.offline:
        trello.save_card(card_id, idea)

    add_tag('Script', idea.path, do_open=True)
Пример #6
0
def go():
    flo = VideoFlo()
    args = flo.get_upload_arguments()
    channel = Channel(flo.config, args.channel)
    dry_run = args.dry_run
    limit = args.limit if args.limit > 0 else 0

    if limit > 0:
        print("Limiting to {} video upload(s)".format(limit))

    trello = Trello()
    if not trello.lists_exist(['Upload', 'Scheduled'], channel):
        return

    upload_dict = get_upload_dict(channel, trello, limit)
    if not dry_run and len(upload_dict) > 0:
        do_uploads(upload_dict)
Пример #7
0
def go():
    flo = VideoFlo()
    idea = Idea()
    idea.read_user_input(flo)
    if not idea.exists():
        print('Directory for {} not found'.format(idea.name))
        return

    open_dir(idea.path)
Пример #8
0
def go():
    flo = VideoFlo()
    args = flo.get_list_arguments()
    channel = Channel(flo.config, args.channel)
    projects = []
    try:
        plist = os.listdir(channel.path)
    except FileNotFoundError:
        print("The path {} is not accessible".format(channel.path))
        return

    for item in plist:
        path = os.path.join(channel.path, item)
        if not os.path.isdir(path):
            continue
        projects.append(path)

    tags = get_tags(projects)
    count = 0
    counts = {key: 0 for key in STAGES}
    verbose = True if type(args.tags) is list else False
    for k, v in sorted(tags.items(), key=operator.itemgetter(1, 0)):
        tag = v[0] if v else 'NOTAG'
        if tag not in args.tags:
            continue
        if verbose:
            print(tag + '\t' + os.path.basename(k))
            counts[tag] = counts[tag] + 1
        else:
            print(os.path.basename(k))
        count += 1

    print('--------------------')
    if verbose:
        for k, v in counts.items():
            print("   {}:\t{}".format(k, v))
        print('--------------------')
    print('   Total:\t{}'.format(count))
Пример #9
0
def go():
    flo = VideoFlo()
    idea = Idea()
    idea.read_user_input(flo)

    if not idea.exists():
        print('Directory for {} not found'.format(idea.name))
        return

    if not idea.offline:
        trello = Trello()
        if not trello.lists_exist(['Edit'], idea.channel):
            return

        success = trello.move_card(idea, 'Edit')
        if not success:
            return

    idea.copy_screen_recordings(flo)

    update_tag('Edit', idea.path)