Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Console App #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mvillajos
Copy link

Added new console project to test use case

Copy link
Contributor

@justinyoo justinyoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mvillajos Thanks for your PR! However, I'd like you to take a look at the "proper" way of building a console app.

EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "YouTubeSubtitlesExtractorConsoleApp", "consoleApp\YouTubeSubtitlesExtractorConsoleApp\YouTubeSubtitlesExtractorConsoleApp.csproj", "{98A6F65D-97EA-4AE2-B662-76497402D5B8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "consoleapp", "consoleapp", "{203D49CC-6E1F-49BA-8DE9-AE7CE216FC9E}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The console app should be under the samples directory, instead of consoleapp


<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As .NET 8 is around the corner, I'd like to target this app to net8.0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the generic builder pattern like:

var host = Host.CreateDefaultBuilder(args);
...

Please refer to: https://learn.microsoft.com/dotnet/core/extensions/generic-host

@mvillajos
Copy link
Author

mvillajos commented Nov 9, 2023

I have synced my fork of your repository to get last changes. I can see that you create samples directory and change target framework to .NET 8.
I can see that now if I run the console app it displays details of the video by calling ExtractVideoDetailsAsync.
I have added a call to ExtractSubtitleAsync with a language code specified via arguments:
image

Now it will be needed a second argument (-l lang_code) to indicate which language code to pass in the call to ExtractSubtitleAsync
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants