help.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #include "../move/move.h"
  8. #include "../pin/pin.h"
  9. void totp_cli_command_help_docopt_commands() {
  10. TOTP_CLI_PRINTF(" " TOTP_CLI_COMMAND_HELP ", " TOTP_CLI_COMMAND_HELP_ALT
  11. ", " TOTP_CLI_COMMAND_HELP_ALT2 " Show command usage help\r\n");
  12. }
  13. void totp_cli_command_help_docopt_usage() {
  14. TOTP_CLI_PRINTF(" " TOTP_CLI_COMMAND_NAME " " DOCOPT_REQUIRED(
  15. TOTP_CLI_COMMAND_HELP " | " TOTP_CLI_COMMAND_HELP_ALT
  16. " | " TOTP_CLI_COMMAND_HELP_ALT2) "\r\n");
  17. }
  18. void totp_cli_command_help_handle() {
  19. TOTP_CLI_PRINTF("Usage:\r\n");
  20. totp_cli_command_help_docopt_usage();
  21. totp_cli_command_list_docopt_usage();
  22. totp_cli_command_add_docopt_usage();
  23. totp_cli_command_delete_docopt_usage();
  24. totp_cli_command_timezone_docopt_usage();
  25. totp_cli_command_move_docopt_usage();
  26. totp_cli_command_pin_docopt_usage();
  27. cli_nl();
  28. TOTP_CLI_PRINTF("Commands:\r\n");
  29. totp_cli_command_help_docopt_commands();
  30. totp_cli_command_list_docopt_commands();
  31. totp_cli_command_add_docopt_commands();
  32. totp_cli_command_delete_docopt_commands();
  33. totp_cli_command_timezone_docopt_commands();
  34. totp_cli_command_move_docopt_commands();
  35. totp_cli_command_pin_docopt_commands();
  36. cli_nl();
  37. TOTP_CLI_PRINTF("Arguments:\r\n");
  38. totp_cli_command_add_docopt_arguments();
  39. totp_cli_command_delete_docopt_arguments();
  40. totp_cli_command_timezone_docopt_arguments();
  41. cli_nl();
  42. TOTP_CLI_PRINTF("Options:\r\n");
  43. totp_cli_command_add_docopt_options();
  44. totp_cli_command_delete_docopt_options();
  45. totp_cli_command_move_docopt_options();
  46. }