-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Restructure command line utilities to support long options without short form #2
Comments
Long options without short form are already supported. For utilities not using the mp4v2::util::Utility class (e.g. mp4tags), look at how the --help and --version options are implemented in mp4tags. For utilities using the Utility class (e.g. mp4chaps), you would just pass 0 as the first argument to Group::add(). At some point I would like to make all utilities use the Utility class in order to make option handling uniform across all utilities. Not for the initial release, though. It would be great if you could open a pull request to add the options listed above (after getting rid of the short forms). I'll then include that in the 2.1.0 release. |
Are you not planning to go for C compatibility again? The C++ additions from TechSmith raised some critics in the community?! (nullptr, see cmus/cmus#1112 (comment))
Ok, I'm pretty busy atm but I'll try. |
That refers to the public headers in However, there was some critique about using
👍 |
I added options for sort tags and the purchase date to mp4tags in the While long options without a short equivalent were already possible in theory, mp4tags' option parsing, especially for the |
You sir, deserve a cookie. Really nice work (I can't test in the next days - but it looks good to me). If this should go I really appreciate it. BTW, this should go to a new issue, but if you would like to add some more atoms and parameters, you could refer to: Here are some examples for additions, that I thought about integrating:
|
So, works for me. As soon as this branch goes into |
Great! The changes are now merged into main. I opened a new issue for the additional tag options. Most of them are not supported by the library yet, so I'll add them after the 2.1.0 release together with some more suggested by @bergert. Closing this issue. |
I came across the issue, that in the command line utilities the whole implementation is based on using options by having a single char as short option and a string as long option is a MUST, which limits the addable options to (readable) ASCII chars, but in fact they are even more limited to
a-z A-Z 0-9
, since-$
would not be very intuitive. And there are not many available chars formp4tags
left.Not having to provide a short option for every parameter, so that existing API stuff could be wrapped into the utilities would be great.
So what I basically did in my branch is to take existing API functions and wrap them around a new option to support them to be set via command line and chose any available char instead of one that really made sense.
Here is an example:
The text was updated successfully, but these errors were encountered: