feat(Shell): Add Scripts

Add FFMPEG and git commit scripts
This commit is contained in:
Nikurasu 2023-11-27 10:43:47 +01:00
parent 1e6359fc0d
commit 3ccd5065b5
Signed by: Nikurasu
GPG Key ID: 9E7F14C03EF1F271
2 changed files with 39 additions and 0 deletions

26
mergeFFMPEG.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/bash
# Assign the first command line argument to the variable video_source
video_source="$1"
# Assign the second command line argument to the variable audio_source
audio_source="$2"
# Assign the third command line argument to the variable output_file
output_file="$3"
# Check if all arguments are provided
if [ "$#" -ne 3 ]; then
echo "Usage: $0 video_source audio_source output_file"
exit 1
fi
# Use ffmpeg to merge the video and audio files
ffmpeg -i "$video_source" -i "$audio_source" -c:v copy -c:a copy -strict experimental "$output_file"
# Check if ffmpeg succeeded
if [ $? -eq 0 ]; then
echo "Merging completed successfully."
else
echo "An error occurred during merging."
fi

13
shell/scripts/gitCommit.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert")
SCOPE=$(gum input --placeholder "scope")
# Since the scope is optional, wrap it in parentheses if it has a value.
test -n "$SCOPE" && SCOPE="($SCOPE)"
# Pre-populate the input with the type(scope): so that the user may change it
SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "Summary of this change")
DESCRIPTION=$(gum write --placeholder "Details of this change (CTRL+D to finish)")
# Commit these changes
gum confirm "Commit changes?" && git commit -a -m "$SUMMARY" -m "$DESCRIPTION"