diff --git a/malcontent-client/docs/malcontent-client.8 b/malcontent-client/docs/malcontent-client.8 index c6bb70b..e61a72b 100644 --- a/malcontent-client/docs/malcontent-client.8 +++ b/malcontent-client/docs/malcontent-client.8 @@ -10,7 +10,7 @@ malcontent\-client — Parental Controls Access Utility .SH SYNOPSIS .IX Header "SYNOPSIS" .\" -\fBmalcontent\-client get [\-q] [\-n] [\fPUSER\fB] +\fBmalcontent\-client get\-app\-filter [\-q] [\-n] [\fPUSER\fB] .PP \fBmalcontent\-client check [\-q] [\-n] [\fPUSER\fB] \fPARG\fB .\" @@ -25,10 +25,10 @@ controls. It communicates with accounts-service, which stores parental controls data. .PP Its first argument is a command to run. Currently, the only supported commands -are \fBget\fP and \fBcheck\fP. +are \fBget\-app\-filter\fP and \fBcheck\fP. .\" -.SH \fBget\fP OPTIONS -.IX Header "get OPTIONS" +.SH \fBget\-app\-filter\fP OPTIONS +.IX Header "get\-app\-filter OPTIONS" .\" .IP "\fBUSER\fP" Username or ID of the user to get the app filter for. If not specified, the diff --git a/malcontent-client/malcontent-client.py b/malcontent-client/malcontent-client.py index e0c15d1..7b7ac28 100644 --- a/malcontent-client/malcontent-client.py +++ b/malcontent-client/malcontent-client.py @@ -138,7 +138,7 @@ def __oars_value_from_string(value_str): raise KeyError('Unknown OARS value ‘{}’'.format(value_str)) -def command_get(user, quiet=False, interactive=True): +def command_get_app_filter(user, quiet=False, interactive=True): """Get the app filter for the given user.""" user_id = __lookup_user_id_or_error(user) app_filter = __get_app_filter_or_error(user_id, interactive) @@ -335,8 +335,9 @@ def main(): parser = argparse.ArgumentParser( description='Query and update parental controls.') subparsers = parser.add_subparsers(metavar='command', - help='command to run (default: ‘get’)') - parser.set_defaults(function=command_get) + help='command to run (default: ' + '‘get-app-filter’)') + parser.set_defaults(function=command_get_app_filter) parser.add_argument('-q', '--quiet', action='store_true', help='output no informational messages') parser.set_defaults(quiet=False) @@ -353,14 +354,16 @@ def main(): help='opposite of --no-interactive') common_parser.set_defaults(interactive=True) - # ‘get’ command - parser_get = subparsers.add_parser('get', parents=[common_parser], - help='get current parental controls ' - 'settings') - parser_get.set_defaults(function=command_get) - parser_get.add_argument('user', default='', nargs='?', - help='user ID or username to get the app filter ' - 'for (default: current user)') + # ‘get-app-filter’ command + parser_get_app_filter = \ + subparsers.add_parser('get-app-filter', + parents=[common_parser], + help='get current app filter settings') + parser_get_app_filter.set_defaults(function=command_get_app_filter) + parser_get_app_filter.add_argument('user', default='', nargs='?', + help='user ID or username to get the ' + 'app filter for (default: current ' + 'user)') # ‘monitor’ command parser_monitor = subparsers.add_parser('monitor',