-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
README.md: Add logical (IF, OR, ELSEIF, ELSE) section and examples #8252
base: master
Are you sure you want to change the base?
Conversation
All of the pseudocode in the "logical code examples" section would cause confusion for most users, IMO |
Maybe this would be better off in the wiki? |
I disagree. When learning a new programming/formatting language there are basic cornerstones that must be and are practically taught for beginners:
These are the basic things that every person (wanting to utilize the language) needs to know. And if the person already has programming experience, it is the first thing he is seeking for in the documentation. This is the content of the basic 4h video course on Python: In yt-dlp's "output language" the basic case of 1st is handled automatically. The more complex cases are explained, but the explanation could be better. The 2nd is in a similar situation - whatever is applicable to yt-dlp - it is explained, but the easiness of explanation could definitely be improved. The third is partly explained, partly not; but even when it is formally presented, the explanations/order/language/terminology are very difficult to get through. My PR is drastically improving the 3rd aspect, while also making the 1st and 2nd better by showing useful examples that the reader might actually want to get. My pseudocode would cause confusion to people who are not in a position to receive this information. But they would get even less from the current explanatory list. But for people who seek this information and are theoretically capable of receiving it, the new section and examples would make it so much easier and better. Remember that I am not suggesting removing the current list and replacing it with my section. I am simply suggesting adding the new section in order to make the syntax much more approachable and easer/faster to understand. |
README.md: Add logical (IF, OR, ELSEIF, ELSE) section and examples
It took me a long time to understand how I could manipulate the output formats in a logical way. Even the realization that it was possible at all took the longest time. I hope that improving the documentation will save a lot of time for other people.
I used practical examples, that illustrate the logic, but also introduced a lot of useful yt-dlp's opportunities as well as provided a better understanding via demonstrating surprising gotchas and important caveats.
Template
Before submitting a pull request make sure you have:
In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:
What is the purpose of your pull request?
Copilot Summary
🤖 Generated by Copilot at 789ba9e
Summary
📝🗝️📋
Enhance output template syntax documentation in
README.md
. Add more explanation, keywords, and examples to help users customize their output filenames.Walkthrough
s
andd
format types in output template syntax (link)README.md
(link)