diff --git a/minet/cli/crowdtangle/search.py b/minet/cli/crowdtangle/search.py index 849e768f1c..978f3c9fcf 100644 --- a/minet/cli/crowdtangle/search.py +++ b/minet/cli/crowdtangle/search.py @@ -11,5 +11,6 @@ method_name='search', item_name='posts', csv_headers=CROWDTANGLE_POST_CSV_HEADERS, - get_args=lambda namespace: [namespace.terms] + get_args=lambda namespace: [namespace.terms], + announce=lambda namespace: 'Searching for: "%s"' % namespace.terms ) diff --git a/minet/cli/crowdtangle/utils.py b/minet/cli/crowdtangle/utils.py index 3cdc90f39c..9e25a1fab8 100644 --- a/minet/cli/crowdtangle/utils.py +++ b/minet/cli/crowdtangle/utils.py @@ -16,7 +16,8 @@ ) -def make_paginated_action(method_name, item_name, csv_headers, get_args=None): +def make_paginated_action(method_name, item_name, csv_headers, get_args=None, + announce=None): def action(namespace, output_file): @@ -55,6 +56,9 @@ def action(namespace, output_file): print_err('Resuming from: %s' % last_date) + if callable(announce): + print_err(announce(namespace)) + # Loading bar loading_bar = tqdm( desc='Fetching %s' % item_name,