geotribu_cli.comments.comments_latest module#
- geotribu_cli.comments.comments_latest.format_output_result(results, format_type=None, count=5)#
Format result according to output option.
- geotribu_cli.comments.comments_latest.get_latest_comments(number=5, sort_by='created_asc', expiration_rotating_hours=1)#
Download and parse latest comments published.
- Paramètres:
number (
int
) – count of comments to download. Must be > 1. Defaults to 5.sort_by (
Literal
['author_asc'
,'author_desc'
,'created_asc'
,'created_desc'
]) – comments sorting criteria. Defaults to « created_asc ».expiration_rotating_hours (int, optional) – number in hours to consider the local file outdated. Defaults to 1.
- Type renvoyé:
- Renvoie:
list of comments objects
- geotribu_cli.comments.comments_latest.parser_comments_latest(subparser)#
Set the argument parser for subcommand.
- Paramètres:
subparser (argparse.ArgumentParser) – parser to set up
- Renvoie:
parser ready to use
- Type renvoyé:
- geotribu_cli.comments.comments_latest.run(args)#
Run the sub command logic.
Open result of a previous command.
- Paramètres:
args (argparse.Namespace) – arguments passed to the subcommand