help.c 1.7 KB

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