1 #ifndef HL_CLI_COMMANDS_H 2 #define HL_CLI_COMMANDS_H 9 #define HL_ORANGE "\033[48;2;255;165;0m" 10 #define HL_NC "\033[0m" 12 #define HL_PROMPT "\nHulaLoop> " 14 #define HL_DELAY_TIMER_LONG "delay" 15 #define HL_DELAY_TIMER_SHORT "de" 16 #define HL_DELAY_TIMER_ARG1 "seconds" 18 #define HL_RECORD_TIMER_LONG "duration" 19 #define HL_RECORD_TIMER_SHORT "du" 20 #define HL_RECORD_TIMER_ARG1 "seconds" 22 #define HL_RECORD_SHORT "r" 23 #define HL_RECORD_LONG "record" 24 #define HL_RECORD_ARG1 "delay" 25 #define HL_RECORD_ARG2 "duration" 27 #define HL_STOP_SHORT "s" 28 #define HL_STOP_LONG "stop" 30 #define HL_PLAY_SHORT "pl" 31 #define HL_PLAY_LONG "play" 33 #define HL_PAUSE_SHORT "pa" 34 #define HL_PAUSE_LONG "pause" 36 #define HL_EXPORT_SHORT "e" 37 #define HL_EXPORT_LONG "export" 38 #define HL_EXPORT_ARG1 "filepath" 40 #define HL_DISCARD_SHORT "d" 41 #define HL_DISCARD_LONG "discard" 42 #define HL_DISCARD_ARG1 "-f" 44 #define HL_LIST_SHORT "l" 45 #define HL_LIST_LONG "list" 47 #define HL_INPUT_SHORT "i" 48 #define HL_INPUT_LONG "input" 49 #define HL_INPUT_ARG1 "name|id" 51 #define HL_OUTPUT_SHORT "o" 52 #define HL_OUTPUT_LONG "output" 53 #define HL_OUTPUT_ARG1 "name|id" 55 #define HL_PRINT_SHORT "p" 56 #define HL_PRINT_LONG "print" 58 #define HL_VERSION_SHORT "v" 59 #define HL_VERSION_LONG "version" 61 #define HL_HELP_SHORT "h" 62 #define HL_HELP_LONG "help" 64 #define HL_LANG_SHORT "lang" 65 #define HL_LANG_LONG "language" 66 #define HL_LANG_ARG1 "target language" 68 #define HL_SYSTEM_SHORT "sys" 69 #define HL_SYSTEM_LONG "system" 71 #define HL_EXIT_LONG "exit" 73 #define C1 " " << left << setw(5) 76 inline void printInteractiveHelp()
83 cout << endl <<
"Commands:" << endl;
84 cout << C1 << HL_HELP_SHORT
", " << C2 << HL_HELP_LONG << qPrintable(CLI::tr(
"Display this help.")) << endl;
85 cout << C1 << HL_VERSION_SHORT
", " << C2 << HL_VERSION_LONG << qPrintable(CLI::tr(
"Display version information.")) << endl;
86 cout << C1 << HL_LIST_SHORT
", " << C2 << HL_LIST_LONG << qPrintable(CLI::tr(
"List all devices.")) << endl;
87 cout << C1 << HL_PRINT_SHORT
", " << C2 << HL_PRINT_LONG << qPrintable(CLI::tr(
"Print the current configuration.")) << endl;
88 cout << C1 << HL_LANG_SHORT << C2 <<
"<" HL_LANG_ARG1
"> " << qPrintable(CLI::tr(
"Switch the application language.")) << endl;
89 cout << C1 << HL_EXIT_LONG << C2 <<
" " << qPrintable(CLI::tr(
"Quit the application.")) << endl;
92 cout << C1 << HL_RECORD_SHORT
", " << C2 << HL_RECORD_LONG
" [" HL_RECORD_ARG1
"] [" HL_RECORD_ARG2
"]";
93 cout << qPrintable(CLI::tr(
"Start recording.")) << endl;
94 cout << C1 << HL_STOP_SHORT
", " << C2 << HL_STOP_LONG << qPrintable(CLI::tr(
"Stop playback or recording.")) << endl;
95 cout << C1 << HL_PLAY_SHORT
", " << C2 << HL_PLAY_LONG << qPrintable(CLI::tr(
"Playback captured audio.")) << endl;
96 cout << C1 << HL_PAUSE_SHORT
", " << C2 << HL_PAUSE_LONG << qPrintable(CLI::tr(
"Pause playback or recording.")) << endl;
97 cout << C1 << HL_EXPORT_SHORT
", " << C2 << HL_EXPORT_LONG
" <" HL_EXPORT_ARG1
"> " << qPrintable(CLI::tr(
"Export captured audio to the specified file.")) << endl;
98 cout << C1 << HL_DISCARD_SHORT
", " << C2 << HL_DISCARD_LONG
" [" HL_DISCARD_ARG1
"] " << qPrintable(CLI::tr(
"Discard the current recording.")) << endl;
101 cout << C1 << HL_INPUT_SHORT
", " << C2 << HL_INPUT_LONG
" <" HL_INPUT_ARG1
"> ";
102 cout << qPrintable(CLI::tr(
"Set the input device.")) << endl;
103 cout << C1 << HL_OUTPUT_SHORT
", " << C2 << HL_OUTPUT_LONG
" <" HL_OUTPUT_ARG1
"> ";
104 cout << qPrintable(CLI::tr(
"Set the output device.")) << endl;
107 cout << C1 << HL_DELAY_TIMER_SHORT
", " << C2 << HL_DELAY_TIMER_LONG
" <" HL_DELAY_TIMER_ARG1
"> ";
108 cout << qPrintable(CLI::tr(
"Set the delay, in seconds, of the countdown timer before record.")) << endl;
109 cout << C1 <<
" " << C2 <<
" " << qPrintable(CLI::tr(
"The timer will be overridden by an argument to the record command.")) << endl;
111 cout << C1 << HL_RECORD_TIMER_SHORT
", " << C2 << HL_RECORD_TIMER_LONG
" <" HL_RECORD_TIMER_ARG1
"> ";
112 cout << qPrintable(CLI::tr(
"Set the duration, in seconds, of the record.")) << endl;
113 cout << C1 <<
" " << C2 <<
" " << qPrintable(CLI::tr(
"The timer will be overridden by an argument to the record command.")) << endl;
116 cout << C1 << HL_SYSTEM_SHORT
", " << C2 << HL_SYSTEM_LONG << qPrintable(CLI::tr(
"Run a system command from within HulaLoop.")) << endl;
120 #endif // END HL_CLI_COMMANDS_H