geotribu_cli.cli_results_rich_formatters module#

geotribu_cli.cli_results_rich_formatters.add_search_criteria_as_str(in_txt, search_filter_dates=None, search_results_total=None, search_results_displayed=None, search_term=None, search_filter_type=None, hint=None)#

Prettify a title with search criterias.

Paramètres:
  • in_txt (str) – initial title text

  • search_filter_dates (Optional[tuple]) – tuple of dates used to filter search

  • search_results_total (Optional[int]) – total of results of search. Defaults to None.

  • search_results_displayed (Optional[int]) – total of results to display. Defaults to None.

  • search_term (Optional[str]) – search terms. Defaults to None.

  • search_filter_type (Optional[str]) – search filter type. Defaults to None.

  • hint (Optional[str]) – optional short hint text to display before the table. Defaults to None.

Type renvoyé:

str

Renvoie:

formatted title

geotribu_cli.cli_results_rich_formatters.format_output_result_comments(results, format_type=None, count=5)#

Format list of comments according to output option.

Paramètres:
  • results (list[Comment]) – result to format

  • format_type (Optional[str]) – format output option. Defaults to None.

  • count (int) – default number of results to display. Defaults to 5.

Type renvoyé:

Union[Table, list[Comment]]

Renvoie:

formatted result ready to print, table or inital list

geotribu_cli.cli_results_rich_formatters.format_output_result_search_content(result, search_term=None, format_type=None, count=5, search_filter_dates=None, search_filter_type=None)#

Format result according to output option.

Paramètres:
  • result (list[dict]) – result to format

  • search_term (str, optional) – term used for search. Defaults to None.

  • format_type (str, optional) – format output option. Defaults to None.

  • count (int, optional) – default number of results to display. Defaults to 5.

  • search_filter_dates (Optional[tuple]) – dates used to filter search. Defaults to None.

  • search_filter_type (Optional[str]) – type used to filter search. Defaults to None.

Renvoie:

formatted result ready to print

Type renvoyé:

str

geotribu_cli.cli_results_rich_formatters.format_output_result_search_image(result, search_term=None, format_type=None, count=5, search_filter_type=None)#

Format result according to output option.

Paramètres:
  • result (list[dict]) – result to format

  • search_term (str, optional) – term used for search. Defaults to None.

  • format_type (str, optional) – format output option. Defaults to None.

  • count (int, optional) – default number of results to display. Defaults to 5.

Renvoie:

formatted result ready to print

Type renvoyé:

str