-
Notifications
You must be signed in to change notification settings - Fork 7
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
Allows DV7toDV8.sh script to work on non-Mac hardware #14
base: main
Are you sure you want to change the base?
Conversation
@nekno thoughts? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ajyey! Thanks for your patience (while I've been traveling) and these contributions!
I've requested some changes for you to approve/make while I test out these changes on macOS.
|
||
## Options | ||
|
||
### -k or --keep-files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### -k or --keep-files | |
### `-k` or `--keep-files` |
|
||
Keeps intermediate files generated during the conversion process. | ||
|
||
### -t or --target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### -t or --target | |
### `-t` or `--target` |
|
||
Specifies the target directory where .mkv files are located. Defaults to the current directory if not specified. | ||
|
||
### -l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### -l | |
### `-l` or `--languages` |
|
||
Specifies comma-separated language codes for audio and subtitle tracks to include in the final .mkv file. If not specified, all tracks are included. | ||
|
||
### -u or --use-local |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### -u or --use-local | |
### `-u` or `--use-local` |
|
||
Uses local system binaries of `mkvtoolnix` and `dovi_tool` if available, instead of the versions bundled with the script. | ||
|
||
### -h or --help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### -h or --help | |
### `-h` or `--help` |
|
||
languageCodes=$(osascript "$languageCodesPath") | ||
|
||
# If we're running on a mac and the language code(s) are not provided, get them from the user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# If we're running on a mac and the language code(s) are not provided, get them from the user | |
# If we're running on a Mac and the language code(s) are not provided, get them from the user |
echo "Options:" | ||
echo "-k|--keep-files Keep working files" | ||
echo "-t|--target PATH Specify the target directory (default: current directory)" | ||
echo "-l|languages LANG Specify the language codes (comma-separated) for audio and subtitle tracks. If not specified, default to all tracks." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "-l|languages LANG Specify the language codes (comma-separated) for audio and subtitle tracks. If not specified, default to all tracks." | |
echo "-l|--languages LANGS Specify comma-separated ISO 639-1 (en,es,de) or ISO 639-2 language codes (eng,spa,ger) for audio and subtitle tracks to keep (default: keep all tracks)" |
@@ -98,7 +146,7 @@ do | |||
|
|||
if [[ $? != 0 ]] || [[ ! -f "$DV8_BL_RPU_HEVC" ]] | |||
then | |||
echo "File to convert BL+RPU. Quitting." | |||
echo "Failed to convert BL+RPU. Quitting." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch 😨
|
||
### -l | ||
|
||
Specifies comma-separated language codes for audio and subtitle tracks to include in the final .mkv file. If not specified, all tracks are included. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifies comma-separated language codes for audio and subtitle tracks to include in the final .mkv file. If not specified, all tracks are included. | |
Specifies comma-separated language codes for audio and subtitle tracks to include in the final `.mkv` file. You can provide [ISO 639-1 codes (`en,es,de`) or ISO 639-2 codes (`eng,spa,ger`)](https://www.loc.gov/standards/iso639-2/php/English_list.php). If not specified, all tracks are included. |
*) # preserve positional arguments | ||
PARAMS="$PARAMS $1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you're moving the script or the mkv files into the same folder each time, the one required param for the script has been the target directory.
It's perfectly fine to support that use case, but what do you think about defaulting to the present working directory (as you've done) but then setting targetDir
here, as the one unlabeled argument, rather than using the -t
/--target
label?
I think it's more common that you wouldn't be moving the files around, the script will have a home and your working files will be in different folders each time, so I think using an unlabeled arg for the target directory makes the most sense.
If -t
/--target
were to be required, then we'd need to update the Platypus app config file to reflect this change in the script as part of this PR.
This MR allows the script to run on non-mac hardware.
My home media server runs on Linux and I do most of my work there, so being able to run this on Linux seemed like it would also be helpful for other users.
This MR: