help.c 2.0 KB

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