def dv_editor(): print('COMMAND:', project.task['command']) if project.task['command'] == 'Load Partners': partner_clear() partner_load() elif project.task['command'] == 'Load Advertisers': advertiser_clear() advertiser_load() elif project.task['command'] == 'Load Campaigns': campaign_clear() campaign_load() elif project.task['command'] == 'Load Insertion Orders and Line Items': creative_clear() creative_load() insertion_order_clear() insertion_order_load() line_item_clear() line_item_load() pacing_clear() pacing_load() bid_strategy_clear() bid_strategy_load() frequency_cap_clear() frequency_cap_load() partner_cost_clear() partner_cost_load() integration_detail_clear() integration_detail_load() elif project.task['command'] == 'Load Insertion Orders and Line Items': campaign_sheet_to_table() insertion_order_clear() insertion_order_load() line_item_clear() line_item_load() segment_clear() segment_load() pacing_clear() pacing_load() bid_strategy_clear() bid_strategy_load() frequency_cap_clear() frequency_cap_load() partner_cost_clear() partner_cost_load() integration_detail_clear() integration_detail_load() elif project.task['command'] in ('Preview', 'Patch'): audit_clear() patch_clear() audit_load() line_item_insert(commit=project.task['command'] == 'Patch') insertion_order_insert(commit=project.task['command'] == 'Patch') insertion_order_patch(commit=project.task['command'] == 'Patch') line_item_patch(commit=project.task['command'] == 'Patch') line_item_map_patch(commit=project.task['command'] == 'Patch') segment_patch(commit=project.task['command'] == 'Patch') pacing_patch(commit=project.task['command'] == 'Patch') bid_strategy_patch(commit=project.task['command'] == 'Patch') frequency_cap_patch(commit=project.task['command'] == 'Patch') partner_cost_patch(commit=project.task['command'] == 'Patch') integration_detail_patch(commit=project.task['command'] == 'Patch') elif project.task['command'] == 'Clear Partners': partner_clear() elif project.task['command'] == 'Clear Advertisers': advertiser_clear() elif project.task['command'] == 'Clear Campaigns': campaign_clear() elif project.task['command'] == 'Clear Insertion Orders and Line Items': creative_clear() segment_clear() pacing_clear() bid_strategy_clear() frequency_cap_clear() partner_cost_clear() integration_detail_clear() insertion_order_clear() line_item_map_clear() line_item_clear() elif project.task['command'] == 'Clear Preview': audit_clear() elif project.task['command'] == 'Clear Patch': patch_clear() elif project.task['command'] == 'Clear All': partner_clear() advertiser_clear() campaign_clear() creative_clear() segment_clear() pacing_clear() bid_strategy_clear() frequency_cap_clear() partner_cost_clear() integration_detail_clear() insertion_order_clear() line_item_map_clear() line_item_clear() audit_clear() patch_clear()
def dv_editor(config, task): print('COMMAND:', task['command']) if task['command'] == 'Load Partners': partner_clear(config, task) partner_load(config, task) pass elif task['command'] == 'Load Advertisers': advertiser_clear(config, task) advertiser_load(config, task) elif task['command'] == 'Load Campaigns': campaign_clear(config, task) campaign_load(config, task) elif task['command'] == 'Load Insertion Orders and Line Items': creative_clear(config, task) creative_load(config, task) insertion_order_clear(config, task) insertion_order_load(config, task) line_item_clear(config, task) line_item_load(config, task) segment_clear(config, task) segment_load(config, task) pacing_clear(config, task) pacing_load(config, task) bid_strategy_clear(config, task) bid_strategy_load(config, task) frequency_cap_clear(config, task) frequency_cap_load(config, task) partner_cost_clear(config, task) partner_cost_load(config, task) integration_detail_clear(config, task) integration_detail_load(config, task) elif task['command'] in ('Preview', 'Update'): audit_clear(config, task) patch_clear(config, task) audit_load(config, task) line_item_insert(config, task, commit=task['command'] == 'Update') insertion_order_insert(config, task, commit=task['command'] == 'Update') insertion_order_patch(config, task, commit=task['command'] == 'Update') line_item_patch(config, task, commit=task['command'] == 'Update') line_item_map_patch(config, task, commit=task['command'] == 'Update') segment_patch(config, task, commit=task['command'] == 'Update') pacing_patch(config, task, commit=task['command'] == 'Update') bid_strategy_patch(config, task, commit=task['command'] == 'Update') frequency_cap_patch(config, task, commit=task['command'] == 'Update') partner_cost_patch(config, task, commit=task['command'] == 'Update') integration_detail_patch(config, task, commit=task['command'] == 'Update') elif task['command'] == 'Clear Partners': partner_clear(config, task) elif task['command'] == 'Clear Advertisers': advertiser_clear(config, task) elif task['command'] == 'Clear Campaigns': campaign_clear(config, task) elif task['command'] == 'Clear Insertion Orders and Line Items': creative_clear(config, task) segment_clear(config, task) pacing_clear(config, task) bid_strategy_clear(config, task) frequency_cap_clear(config, task) partner_cost_clear(config, task) integration_detail_clear(config, task) insertion_order_clear(config, task) line_item_map_clear(config, task) line_item_clear(config, task) elif task['command'] == 'Clear Preview': audit_clear(config, task) elif task['command'] == 'Clear Update': patch_clear(config, task) elif task['command'] == 'Clear All': partner_clear(config, task) advertiser_clear(config, task) campaign_clear(config, task) creative_clear(config, task) segment_clear(config, task) pacing_clear(config, task) bid_strategy_clear(config, task) frequency_cap_clear(config, task) partner_cost_clear(config, task) integration_detail_clear(config, task) insertion_order_clear(config, task) line_item_map_clear(config, task) line_item_clear(config, task) audit_clear(config, task) patch_clear(config, task)