diff --git a/README.md b/README.md index 2525542..2525edb 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ And vlc is used to play it Graphics on a plain tty look awsome!!!! ## Todo: - [X] Video method switch +- [X] Version switch - [ ] Better support for yt-dlp features - [ ] Add somekind of "history" or "save video" mechanic # Credit (for some AWSOME dependencies): diff --git a/main.c b/main.c index caa142c..9d92ef7 100644 --- a/main.c +++ b/main.c @@ -17,9 +17,10 @@ static char helpstr[] = "\n" "Download video from target and they play it via vlc\n" "\n" "Posible command options:\n" - " -h | --help : Display this message\n" - " -k | --kitty : Preview thumbnail if you have kitty\n" - " -V | --vout : Specify a valid vlc output method\n" + " -h | --help : Display this message\n" + " -k | --kitty : Preview thumbnail if you have kitty\n" + " -v | --version : Print version and exit\n" + " -V | --vout : Specify a valid vlc output method\n" "\n" "Examples:\n" " youtty 'Bad Apple' Download and watch Bad Apple!!\n" @@ -36,6 +37,9 @@ int main(int argc, char *argv[]){ if(!strcmp(argv[i],"-h") || !strcmp(argv[i],"--help")){ printf("%s",helpstr); return 0; + } else if(!strcmp(argv[i],"-v") || !strcmp(argv[i],"--version")) { + printf("youtty version: v0.1.0\n"); + return 0; } else if(!strcmp(argv[i],"-k") || !strcmp(argv[i],"--kitty")) { kitten=true; } else if(!strcmp(argv[i],"-V") || !strcmp(argv[i],"--vout")) {