help.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "help.h"
  2. #include "../../cli_helpers.h"
  3. #include "../add/add.h"
  4. #include "../delete/delete.h"
  5. #include "../list/list.h"
  6. #include "../timezone/timezone.h"
  7. void totp_cli_command_help_docopt_commands() {
  8. TOTP_CLI_PRINTF(" " TOTP_CLI_COMMAND_HELP ", " TOTP_CLI_COMMAND_HELP_ALT ", " TOTP_CLI_COMMAND_HELP_ALT2 " Show command usage help\r\n");
  9. }
  10. void totp_cli_command_help_docopt_usage() {
  11. TOTP_CLI_PRINTF(" " TOTP_CLI_COMMAND_NAME " " DOCOPT_REQUIRED(TOTP_CLI_COMMAND_HELP " | " TOTP_CLI_COMMAND_HELP_ALT " | " TOTP_CLI_COMMAND_HELP_ALT2) "\r\n");
  12. }
  13. void totp_cli_command_help_handle() {
  14. TOTP_CLI_PRINTF("Usage:\r\n");
  15. totp_cli_command_help_docopt_usage();
  16. totp_cli_command_list_docopt_usage();
  17. totp_cli_command_add_docopt_usage();
  18. totp_cli_command_delete_docopt_usage();
  19. totp_cli_command_timezone_docopt_usage();
  20. cli_nl();
  21. TOTP_CLI_PRINTF("Commands:\r\n");
  22. totp_cli_command_help_docopt_commands();
  23. totp_cli_command_list_docopt_commands();
  24. totp_cli_command_add_docopt_commands();
  25. totp_cli_command_delete_docopt_commands();
  26. totp_cli_command_timezone_docopt_commands();
  27. cli_nl();
  28. TOTP_CLI_PRINTF("Arguments:\r\n");
  29. totp_cli_command_add_docopt_arguments();
  30. totp_cli_command_delete_docopt_arguments();
  31. totp_cli_command_timezone_docopt_arguments();
  32. cli_nl();
  33. TOTP_CLI_PRINTF("Options:\r\n");
  34. totp_cli_command_add_docopt_options();
  35. totp_cli_command_delete_docopt_options();
  36. }