mirror of
https://codeberg.org/armin/tcd.git
synced 2026-09-01 05:50:46 +02:00
re-format usage information output, update README accordingly
This commit is contained in:
parent
6c9fb5b7e9
commit
545ada8bc3
2 changed files with 146 additions and 42 deletions
24
tcd.c
24
tcd.c
|
|
@ -939,8 +939,7 @@ static void print_help(const char *prog)
|
|||
{
|
||||
char buf[256];
|
||||
snprintf(buf, sizeof(buf), ANSI_BOLD ANSI_CYAN "tcd" ANSI_RESET
|
||||
" \xe2\x80\x94 Transcode Detector "
|
||||
"Psychoacoustic audio authenticity analysis");
|
||||
" (Transcode Detector / Psychoacoustic audio authenticity analysis tool)");
|
||||
int v = vis_len(buf);
|
||||
printf(" %s", buf);
|
||||
int pad = tw - 2 - v;
|
||||
|
|
@ -967,30 +966,29 @@ static void print_help(const char *prog)
|
|||
printf(" " ANSI_BOLD "Options:" ANSI_RESET);
|
||||
printf("\n");
|
||||
|
||||
#define OPT_COL 28
|
||||
|
||||
#define OPT(fmt, desc) do { \
|
||||
printf(" " ANSI_GREEN fmt ANSI_RESET " %s", desc); \
|
||||
int flen = vis_len(fmt); \
|
||||
int pad = OPT_COL - flen; \
|
||||
if (pad < 1) pad = 1; \
|
||||
printf(" " ANSI_GREEN "%s" ANSI_RESET "%*s%s", fmt, pad, "", desc); \
|
||||
printf("\n"); \
|
||||
} while (0)
|
||||
|
||||
{
|
||||
char buf[80];
|
||||
snprintf(buf, sizeof(buf), "Detection sensitivity 1-99 [" ANSI_CYAN "%d" ANSI_RESET "]", THRESHOLD_DEFAULT);
|
||||
snprintf(buf, sizeof(buf), "Detection sensitivity 1-99 [" ANSI_CYAN "%d" ANSI_RESET "]", THRESHOLD_DEFAULT);
|
||||
OPT("-t, --threshold PCT", buf);
|
||||
}
|
||||
{
|
||||
char buf[80];
|
||||
snprintf(buf, sizeof(buf), ANSI_DIM " Lower = fewer, higher = more" ANSI_RESET);
|
||||
printf(" %s", buf);
|
||||
printf("\n");
|
||||
snprintf(buf, sizeof(buf), "FFT size, power of 2 [" ANSI_CYAN "%d" ANSI_RESET "]", FFT_SIZE_DEFAULT);
|
||||
OPT("-f, --fft-size N", buf);
|
||||
}
|
||||
{
|
||||
char buf[80];
|
||||
snprintf(buf, sizeof(buf), "FFT size, power of 2 [" ANSI_CYAN "%d" ANSI_RESET "]", FFT_SIZE_DEFAULT);
|
||||
OPT("-f, --fft-size N", buf);
|
||||
}
|
||||
{
|
||||
char buf[80];
|
||||
snprintf(buf, sizeof(buf), "Seconds to analyze [" ANSI_CYAN "%d" ANSI_RESET "]", MAX_ANALYSIS_SECS);
|
||||
snprintf(buf, sizeof(buf), "Seconds to analyze [" ANSI_CYAN "%d" ANSI_RESET "]", MAX_ANALYSIS_SECS);
|
||||
OPT("-d, --duration SEC", buf);
|
||||
}
|
||||
OPT("-r, --recursive", "Recurse into subdirectories");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue