geotribu_cli.history module¶
Store and load CLI history.
- class geotribu_cli.history.CliHistory¶
Bases :
object
Module to manipulate CLI history.
- __init__()¶
Module instanciation.
- dump(cmd_name, results_to_dump, request_performed='', key_field='url')¶
Dump history.
- Paramètres:
cmd_name (str) – name of the command to save from. Used to customize file name.
results_to_dump (list[dict]) – list of results (dict) to dump
request_performed (str) – operation performed (search term, etc.). Defaults to « « .
key_field (str, optional) – key in results matching the uri (path, url…). Defaults to « url ».
- load(cmd_name=None, result_index=-1)¶
Load from history.
- Paramètres:
- Renvoie:
line value from history
- Type renvoyé: