help.c 2.1 KB

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