diff --git a/cygwin/Install.cmd b/cygwin/Install.cmd index c06ab7a..eb6b29d 100644 --- a/cygwin/Install.cmd +++ b/cygwin/Install.cmd @@ -1,6 +1,6 @@ @echo off -set VERSION=6.7 +set VERSION=6.8 echo. echo ##################################### echo # Welcome to ks-tools installer %VERSION% # diff --git a/cygwin/ks-tools.cmd b/cygwin/ks-tools.cmd index 2bc545c..bc2788d 100644 --- a/cygwin/ks-tools.cmd +++ b/cygwin/ks-tools.cmd @@ -2,12 +2,12 @@ rem ###################################### rem # ks-tools for Windows # -rem # U. Modificacion: 10-03-2021 # +rem # U. Modificacion: 22-03-2021 # rem # Author: q3aql # rem # Contact: q3aql@protonmail.ch # rem # License: GPL v2.0 # rem ###################################### -set VERSION=6.7 +set VERSION=6.8 rem # Start ks-tools terminal (bash) mkdir home\%USERNAME% diff --git a/cygwin/prompt/ks-tools-zui.cmd.disabled b/cygwin/prompt/ks-tools-zui.cmd.disabled index 755fe1f..800f74e 100644 --- a/cygwin/prompt/ks-tools-zui.cmd.disabled +++ b/cygwin/prompt/ks-tools-zui.cmd.disabled @@ -2,12 +2,12 @@ rem ###################################### rem # ks-tools for Windows # -rem # U. Modificacion: 10-03-2021 # +rem # U. Modificacion: 22-03-2021 # rem # Author: q3aql # rem # Contact: q3aql@protonmail.ch # rem # License: GPL v2.0 # rem ###################################### -set VERSION=6.7 +set VERSION=6.8 rem # Start ks-tools ZUI (bash) mkdir home\%USERNAME% diff --git a/cygwin/prompt/ks-zui.disabled b/cygwin/prompt/ks-zui.disabled index d3c7166..46fee1a 100644 --- a/cygwin/prompt/ks-zui.disabled +++ b/cygwin/prompt/ks-zui.disabled @@ -2,12 +2,12 @@ ################################################################# # ks-zui (ks-tools) - Simple zenity user interface for ks-tools # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ################################################################# -VERSION="6.7 (BETA)" -M_DATE="100321" +VERSION="6.8 (BETA)" +M_DATE="220321" # Function to show about function showAbout() { diff --git a/disabled/ks-zui b/disabled/ks-zui index 27b915a..d4a8665 100755 --- a/disabled/ks-zui +++ b/disabled/ks-zui @@ -2,12 +2,12 @@ ################################################################# # ks-zui (ks-tools) - Simple zenity user interface for ks-tools # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ################################################################# -VERSION="6.7 (BETA)" -M_DATE="100321" +VERSION="6.8 (BETA)" +M_DATE="220321" # Function to show about function showAbout() { @@ -17,7 +17,7 @@ function showAbout() { } # Function to show information of video file -# Sintax: showVideoInfo +# Syntax: showVideoInfo function showVideoInfo() { videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ | Select the video file" --file-selection) @@ -28,7 +28,7 @@ function showVideoInfo() { } # Function to convert MP4 with subs -# Sintax: convertMP4WithSub +# Syntax: convertMP4WithSub function convertMP4WithSub() { videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ | Select the video file" --file-selection) @@ -84,7 +84,7 @@ function convertMP4WithSub() { } # Function to convert MP4 -# Sintax: convertMP4 +# Syntax: convertMP4 function convertMP4() { videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ | Select the video file" --file-selection) @@ -137,7 +137,7 @@ function convertMP4() { } # Function to convert AVI with subs -# Sintax: convertAVIWithSub +# Syntax: convertAVIWithSub function convertAVIWithSub() { videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ | Select the video file" --file-selection) @@ -193,7 +193,7 @@ function convertAVIWithSub() { } # Function to convert AVI -# Sintax: convertAVIW +# Syntax: convertAVIW function convertAVI() { videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ | Select the video file" --file-selection) @@ -246,7 +246,7 @@ function convertAVI() { } # Function to convert VOB -# Sintax: convertVOB +# Syntax: convertVOB function convertVOB() { videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ | Select the video file" --file-selection) diff --git a/prompt/ks-tools b/prompt/ks-tools index 66a243e..565833d 100755 --- a/prompt/ks-tools +++ b/prompt/ks-tools @@ -2,12 +2,12 @@ ############################################################### # ks-tools - Initialize the ks-tools terminal (using xterm) # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Variables name_terminal="ks-tools v${VERSION} (${M_DATE})" diff --git a/prompt/ks-tools-rc b/prompt/ks-tools-rc index 18c903b..fa7f93d 100644 --- a/prompt/ks-tools-rc +++ b/prompt/ks-tools-rc @@ -114,12 +114,12 @@ fi echo "" echo " #################################" -echo " # ks-tools 6.7 (for Unix/Linux) #" +echo " # ks-tools 6.8 (for Unix/Linux) #" echo " #################################" echo "" echo " * Available commands:" echo "" -echo " - ks-upv - ks-vob" +echo " - ks-upv - ks-crop" echo " - ks-upa - ks-oga" echo " - ks-upf - ks-oga-album" echo " - ks-upr - ks-mp4-wrapper" @@ -129,4 +129,5 @@ echo " - ks-mp4s - ks-mp4k-wrapper" echo " - ks-mix - ks-mp4s-wrapper" echo " - ks-avi - ks-mp4s-folder" echo " - ks-mp3 - ks-mp3-album" +echo " - ks-vob" echo "" diff --git a/prompt/ks-tools-zui b/prompt/ks-tools-zui index afe9f07..094d776 100755 --- a/prompt/ks-tools-zui +++ b/prompt/ks-tools-zui @@ -2,12 +2,12 @@ ############################################################### # ks-tools - Initialize the ks-tools ZUI (using xterm) # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7 (BETA)" -M_DATE="100321" +VERSION="6.8 (BETA)" +M_DATE="220321" # Variables name_terminal="ks-tools v${VERSION} (${M_DATE})" diff --git a/src/ks-avi b/src/ks-avi index 5c9431c..109d997 100755 --- a/src/ks-avi +++ b/src/ks-avi @@ -2,12 +2,12 @@ ############################################################### # ks-avi (ks-tools) - Convert video to AVI format # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters dirTemp="/tmp" @@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -60,7 +60,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -84,7 +84,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -93,7 +93,7 @@ function showFileWithSpace() { echo ${DisplayName} } -# Sintax: ks-avi +# Syntax: ks-avi if [ -z "${1}" ] ; then echo "" echo "* ks-avi (ks-tools) v${VERSION} (${M_DATE})" @@ -112,7 +112,7 @@ if [ -z "${1}" ] ; then echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-avi " echo "" @@ -141,9 +141,9 @@ codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | yuv420p10le=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "yuv420p10le") codec_h265_hevc="${codec_h265}${codec_hevc}${yuv420p10le}" if [ -z "${codec_h265_hevc}" ] ; then - p_conversion="-s ${rel_size} -c:v ${vcodec} -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}" + p_conversion="-s ${rel_size} -c:v ${vcodec} -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}" else - p_conversion="-s ${rel_size} -c:v ${vcodec} -pix_fmt yuv420p -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}" + p_conversion="-s ${rel_size} -c:v ${vcodec} -pix_fmt yuv420p -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}" fi # Init conversion file @@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-avi " echo "" @@ -282,9 +282,9 @@ else else rel_size="${resolution}" if [ -z "${codec_h265_hevc}" ] ; then - p_conversion="-s ${rel_size} -c:v ${vcodec} -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}" + p_conversion="-s ${rel_size} -c:v ${vcodec} -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}" else - p_conversion="-s ${rel_size} -c:v ${vcodec} -pix_fmt yuv420p -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}" + p_conversion="-s ${rel_size} -c:v ${vcodec} -pix_fmt yuv420p -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}" fi fi echo -n "* (Default: n) Do you want apply '-max_muxing_queue_size 9999' patch? (y/n): " ; read patch_thread diff --git a/src/ks-crop b/src/ks-crop index 991e840..f22cefb 100755 --- a/src/ks-crop +++ b/src/ks-crop @@ -6,7 +6,7 @@ # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" +VERSION="6.8" M_DATE="220321" # Global parameters diff --git a/src/ks-mix b/src/ks-mix index 3b4ca41..d4fbbdc 100755 --- a/src/ks-mix +++ b/src/ks-mix @@ -2,12 +2,12 @@ ##################################################################### # ks-mix (ks-tools) - Extract video/audio and mix video/audio files # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ##################################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # File(s) detection current_dir=$(pwd) @@ -51,7 +51,7 @@ else subs_found="NOT FOUND" fi -# Function to show menu again when sintax is wrong +# Function to show menu again when Syntax is wrong function show_menu() { echo "" echo "* ks-mix (ks-tools) v${VERSION} (${M_DATE})" @@ -63,7 +63,7 @@ function show_menu() { echo " + Audio file: ${audio_file_dir} (${audio_found})" echo " + Subs file: ${subs_file_dir} (${subs_found})" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mix -evid --> Extract video track" echo " $ ks-mix -ev25 --> Extract video track to 25 fps (only for H264)" @@ -81,7 +81,7 @@ function show_menu() { exit } -# Show menu and sintax +# Show menu and Syntax if [ -z "${1}" ] ; then show_menu elif [ "${1}" == "-evid" ] ; then diff --git a/src/ks-mp3 b/src/ks-mp3 index 0dfdb6a..9491b6b 100755 --- a/src/ks-mp3 +++ b/src/ks-mp3 @@ -2,12 +2,12 @@ ######################################################################### # ks-mp3 (ks-tools) - Convert video/audio file(s) to MP3 (Audio) Format # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ######################################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters dirTemp="/tmp" @@ -33,7 +33,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -53,7 +53,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -86,7 +86,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -105,11 +105,11 @@ function showFileWithSpace() { DisplayName=$(echo ${DisplayName} | cut -c4-100) fi fi - fi + fi echo ${DisplayName} } -# Sintax: ks-mp3 +# Syntax: ks-mp3 if [ -z "${1}" ] ; then echo "" echo "* ks-mp3 (ks-tools) v${VERSION} (${M_DATE})" @@ -122,7 +122,7 @@ if [ -z "${1}" ] ; then echo " - Bitrate audio: ${b_acodec}" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp3 " echo "" @@ -158,7 +158,7 @@ if [ -z "${2}" ] ; then echo " - Bitrate audio: ${b_acodec}" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp3 " echo "" @@ -249,7 +249,7 @@ else else genre_file="${genre_file}" fi - + # Check audio 5.1 or 7.1 audio_5_7_1=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "5.1") audio_5_7_1_2=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "7.1") diff --git a/src/ks-mp3-album b/src/ks-mp3-album index 19bff06..0bcc5bc 100755 --- a/src/ks-mp3-album +++ b/src/ks-mp3-album @@ -2,12 +2,12 @@ ###################################################################### # ks-mp3-album (ks-tools) - Convert folder album to MP3 Audio Format # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ###################################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Variables tempFile="/tmp/ks-mp4s-folder.txt" @@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -60,7 +60,7 @@ function extractFolderOrFile() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -79,12 +79,12 @@ function showFileWithSpace() { DisplayName=$(echo ${DisplayName} | cut -c4-100) fi fi - fi + fi echo ${DisplayName} } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -116,7 +116,7 @@ function removeExtension() { echo ${wordToConvert} } -# Sintax: ks-mp3-album " echo "" @@ -140,14 +140,14 @@ fi # Check if folder exist if [ -d "${1}" ] ; then - echo null > /dev/null + echo null > /dev/null else - echo "" - echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})" - echo "" - echo "+ The folder '${1}' does not exist!" - echo "" - exit + echo "" + echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})" + echo "" + echo "+ The folder '${1}' does not exist!" + echo "" + exit fi # Scan videos/audio files format @@ -161,14 +161,14 @@ echo -n "* Scanning ${1} " && sleep 4 echo "" rm -rf ${tempFile} && touch ${tempFile} for format in ${formatFiles} ; do - find "${1}"/*.${format} &> ${tempFileTest} - if [ $? -ne 0 ] ; then - echo "null" > /dev/null - else - echo "+ Video file(s) in .${format} found!" - cd "${1}" && ls -1 *.${format} &>> ${tempFile} - fail=0 - fi + find "${1}"/*.${format} &> ${tempFileTest} + if [ $? -ne 0 ] ; then + echo "null" > /dev/null + else + echo "+ Video file(s) in .${format} found!" + cd "${1}" && ls -1 *.${format} &>> ${tempFile} + fail=0 + fi done # Set the global metadata album @@ -199,34 +199,34 @@ fi convert_files=1 num_files=$(cat ${tempFile} | wc -l) if [ ${num_files} -eq 0 ] ; then - echo "" - echo "+ No video/audio file(s) found in folder '${1}" - echo "" - exit + echo "" + echo "+ No video/audio file(s) found in folder '${1}" + echo "" + exit else echo "" echo "* List of files:" echo "" - while [ ${convert_files} -le ${num_files} ] ; do - show_file=$(cat ${tempFile} | head -${convert_files} | tail -1) - echo " + ${show_file}" - convert_files=$(expr ${convert_files} + 1) - done - echo "" - echo "* The output folder will be '${1}/to-mp3'" - # Execute commands for conversion - echo "" - echo -n "* (Default: y) Do you want run the conversion? (y/n): " ; read run_commands_ffmpeg - if [ "${run_commands_ffmpeg}" == "n" ] ; then - exit - else - convert_files=1 - cd "${1}" && mkdir -p to-mp3 && rm -rf to-mp3/* - while [ ${convert_files} -le ${num_files} ] ; do - show_file=$(cat ${tempFile} | head -${convert_files} | tail -1) - fname=$(echo "${show_file}" | cut -d "." -f 1) - name_title_default=$(removeExtension "${show_file}") - name_title_default=$(showFileWithSpace "${name_title_default}") + while [ ${convert_files} -le ${num_files} ] ; do + show_file=$(cat ${tempFile} | head -${convert_files} | tail -1) + echo " + ${show_file}" + convert_files=$(expr ${convert_files} + 1) + done + echo "" + echo "* The output folder will be '${1}/to-mp3'" + # Execute commands for conversion + echo "" + echo -n "* (Default: y) Do you want run the conversion? (y/n): " ; read run_commands_ffmpeg + if [ "${run_commands_ffmpeg}" == "n" ] ; then + exit + else + convert_files=1 + cd "${1}" && mkdir -p to-mp3 && rm -rf to-mp3/* + while [ ${convert_files} -le ${num_files} ] ; do + show_file=$(cat ${tempFile} | head -${convert_files} | tail -1) + fname=$(echo "${show_file}" | cut -d "." -f 1) + name_title_default=$(removeExtension "${show_file}") + name_title_default=$(showFileWithSpace "${name_title_default}") echo "" echo "* METADATA for '${show_file}'" echo "" @@ -270,24 +270,24 @@ else audio_track="${audio_track}" fi echo -n "* (Default: ${name_title_default}) Type name of title: " ; read name_title - if [ -z "${name_title}" ] ; then - name_title="${name_title_default}" - else - name_title="${name_title}" - fi + if [ -z "${name_title}" ] ; then + name_title="${name_title_default}" + else + name_title="${name_title}" + fi echo -n "* (Default: ${track_init}) Type number of track: " ; read track_file - if [ -z "${track_file}" ] ; then - track_num="${track_init}" - else - track_num="${track_file}" - fi + if [ -z "${track_file}" ] ; then + track_num="${track_init}" + else + track_num="${track_file}" + fi echo -n "* (Default: ${artist_init}) Type name of artist: " ; read artist_file - if [ -z "${artist_file}" ] ; then - artist_title="${artist_init}" - else - artist_title="${artist_file}" - artist_init="${artist_file}" - fi + if [ -z "${artist_file}" ] ; then + artist_title="${artist_init}" + else + artist_title="${artist_file}" + artist_init="${artist_file}" + fi # Check audio 5.1 or 7.1 audio_5_7_1=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "5.1") audio_5_7_1_2=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "7.1") @@ -301,6 +301,6 @@ else # Increment variables convert_files=$(expr ${convert_files} + 1) track_init=$(expr ${track_num} + 1) - done - fi + done + fi fi diff --git a/src/ks-mp4 b/src/ks-mp4 index b4ee60d..d3b09fd 100755 --- a/src/ks-mp4 +++ b/src/ks-mp4 @@ -2,12 +2,12 @@ ############################################################### # ks-mp4 (ks-tools) - Convert video to MP4 format # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters dirTemp="/tmp" @@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -60,7 +60,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -84,7 +84,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -93,7 +93,7 @@ function showFileWithSpace() { echo ${DisplayName} } -# Sintax: ks-mp4 +# Syntax: ks-mp4 if [ -z "${1}" ] ; then echo "" echo "* ks-mp4 (ks-tools) v${VERSION} (${M_DATE})" @@ -112,7 +112,7 @@ if [ -z "${1}" ] ; then echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp4 " echo "" @@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp4 " echo "" diff --git a/src/ks-mp4k b/src/ks-mp4k index e86c11f..17ac4f1 100755 --- a/src/ks-mp4k +++ b/src/ks-mp4k @@ -2,12 +2,12 @@ ############################################################### # ks-mp4k (ks-tools) - Convert video to MP4 format (4K) # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters dirTemp="/tmp" @@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -60,7 +60,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -84,7 +84,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -93,7 +93,7 @@ function showFileWithSpace() { echo ${DisplayName} } -# Sintax: ks-mp4k +# Syntax: ks-mp4k if [ -z "${1}" ] ; then echo "" echo "* ks-mp4k (ks-tools) v${VERSION} (${M_DATE})" @@ -112,7 +112,7 @@ if [ -z "${1}" ] ; then echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp4k " echo "" @@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp4k " echo "" diff --git a/src/ks-mp4s b/src/ks-mp4s index 40d0cf2..7078cf9 100755 --- a/src/ks-mp4s +++ b/src/ks-mp4s @@ -2,12 +2,12 @@ ############################################################### # ks-mp4s (ks-tools) - Convert video to MP4 format (Series) # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters dirTemp="/tmp" @@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -60,7 +60,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -84,7 +84,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -93,7 +93,7 @@ function showFileWithSpace() { echo ${DisplayName} } -# Sintax: ks-mp4s +# Syntax: ks-mp4s if [ -z "${1}" ] ; then echo "" echo "* ks-mp4s (ks-tools) v${VERSION} (${M_DATE})" @@ -112,7 +112,7 @@ if [ -z "${1}" ] ; then echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp4s " echo "" @@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp4s " echo "" diff --git a/src/ks-mp4s-folder b/src/ks-mp4s-folder index 2913cd0..b63151e 100755 --- a/src/ks-mp4s-folder +++ b/src/ks-mp4s-folder @@ -2,12 +2,12 @@ ################################################################################# # ks-mp4s-folder (ks-tools) - Convert videos from folder to MP4 format (Series) # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ################################################################################# -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Variables tempFile="/tmp/ks-mp4s-folder.txt" @@ -21,7 +21,7 @@ if [ -z "${1}" ] ; then echo "" echo "- Convert videos from folder to MP4 format (Series)" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-mp4s-folder [subs]" echo "" diff --git a/src/ks-oga b/src/ks-oga index 1836e8f..7d38f6b 100755 --- a/src/ks-oga +++ b/src/ks-oga @@ -2,12 +2,12 @@ ############################################################################# # ks-oga (ks-tools) - Convert video/audio file(s) to OGA (OGG Audio) Format # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################################# -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters dirTemp="/tmp" @@ -33,7 +33,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -53,7 +53,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -86,7 +86,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -105,11 +105,11 @@ function showFileWithSpace() { DisplayName=$(echo ${DisplayName} | cut -c4-100) fi fi - fi + fi echo ${DisplayName} } -# Sintax: ks-oga +# Syntax: ks-oga if [ -z "${1}" ] ; then echo "" echo "* ks-oga (ks-tools) v${VERSION} (${M_DATE})" @@ -122,7 +122,7 @@ if [ -z "${1}" ] ; then echo " - Bitrate audio: ${b_acodec}" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-oga " echo "" @@ -158,7 +158,7 @@ if [ -z "${2}" ] ; then echo " - Bitrate audio: ${b_acodec}" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-oga " echo "" @@ -249,7 +249,7 @@ else else genre_file="${genre_file}" fi - + # Check audio 5.1 or 7.1 audio_5_7_1=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "5.1") audio_5_7_1_2=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "7.1") diff --git a/src/ks-oga-album b/src/ks-oga-album index 6aa2146..b1a1976 100755 --- a/src/ks-oga-album +++ b/src/ks-oga-album @@ -2,12 +2,12 @@ ############################################################################ # ks-oga-album (ks-tools) - Convert folder album to OGA (OGG Audio) Format # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################################ -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Variables tempFile="/tmp/ks-mp4s-folder.txt" @@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -60,7 +60,7 @@ function extractFolderOrFile() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -79,12 +79,12 @@ function showFileWithSpace() { DisplayName=$(echo ${DisplayName} | cut -c4-100) fi fi - fi + fi echo ${DisplayName} } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -116,7 +116,7 @@ function removeExtension() { echo ${wordToConvert} } -# Sintax: ks-oga +# Syntax: ks-oga if [ -z "${1}" ] ; then echo "" echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})" @@ -129,7 +129,7 @@ if [ -z "${1}" ] ; then echo " - Bitrate audio: ${b_acodec}" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-oga " echo "" @@ -140,14 +140,14 @@ fi # Check if folder exist if [ -d "${1}" ] ; then - echo null > /dev/null + echo null > /dev/null else - echo "" - echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})" - echo "" - echo "+ The folder '${1}' does not exist!" - echo "" - exit + echo "" + echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})" + echo "" + echo "+ The folder '${1}' does not exist!" + echo "" + exit fi # Scan videos/audio files format @@ -161,14 +161,14 @@ echo -n "* Scanning ${1} " && sleep 4 echo "" rm -rf ${tempFile} && touch ${tempFile} for format in ${formatFiles} ; do - find "${1}"/*.${format} &> ${tempFileTest} - if [ $? -ne 0 ] ; then - echo "null" > /dev/null - else - echo "+ Video file(s) in .${format} found!" - cd "${1}" && ls -1 *.${format} &>> ${tempFile} - fail=0 - fi + find "${1}"/*.${format} &> ${tempFileTest} + if [ $? -ne 0 ] ; then + echo "null" > /dev/null + else + echo "+ Video file(s) in .${format} found!" + cd "${1}" && ls -1 *.${format} &>> ${tempFile} + fail=0 + fi done # Set the global metadata album @@ -199,34 +199,34 @@ fi convert_files=1 num_files=$(cat ${tempFile} | wc -l) if [ ${num_files} -eq 0 ] ; then - echo "" - echo "+ No video/audio file(s) found in folder '${1}" - echo "" - exit + echo "" + echo "+ No video/audio file(s) found in folder '${1}" + echo "" + exit else echo "" echo "* List of files:" echo "" - while [ ${convert_files} -le ${num_files} ] ; do - show_file=$(cat ${tempFile} | head -${convert_files} | tail -1) - echo " + ${show_file}" - convert_files=$(expr ${convert_files} + 1) - done - echo "" - echo "* The output folder will be '${1}/to-oga'" - # Execute commands for conversion - echo "" - echo -n "* (Default: y) Do you want run the conversion? (y/n): " ; read run_commands_ffmpeg - if [ "${run_commands_ffmpeg}" == "n" ] ; then - exit - else - convert_files=1 - cd "${1}" && mkdir -p to-oga && rm -rf to-oga/* - while [ ${convert_files} -le ${num_files} ] ; do - show_file=$(cat ${tempFile} | head -${convert_files} | tail -1) - fname=$(echo "${show_file}" | cut -d "." -f 1) - name_title_default=$(removeExtension "${show_file}") - name_title_default=$(showFileWithSpace "${name_title_default}") + while [ ${convert_files} -le ${num_files} ] ; do + show_file=$(cat ${tempFile} | head -${convert_files} | tail -1) + echo " + ${show_file}" + convert_files=$(expr ${convert_files} + 1) + done + echo "" + echo "* The output folder will be '${1}/to-oga'" + # Execute commands for conversion + echo "" + echo -n "* (Default: y) Do you want run the conversion? (y/n): " ; read run_commands_ffmpeg + if [ "${run_commands_ffmpeg}" == "n" ] ; then + exit + else + convert_files=1 + cd "${1}" && mkdir -p to-oga && rm -rf to-oga/* + while [ ${convert_files} -le ${num_files} ] ; do + show_file=$(cat ${tempFile} | head -${convert_files} | tail -1) + fname=$(echo "${show_file}" | cut -d "." -f 1) + name_title_default=$(removeExtension "${show_file}") + name_title_default=$(showFileWithSpace "${name_title_default}") echo "" echo "* METADATA for '${show_file}'" echo "" @@ -270,24 +270,24 @@ else audio_track="${audio_track}" fi echo -n "* (Default: ${name_title_default}) Type name of title: " ; read name_title - if [ -z "${name_title}" ] ; then - name_title="${name_title_default}" - else - name_title="${name_title}" - fi + if [ -z "${name_title}" ] ; then + name_title="${name_title_default}" + else + name_title="${name_title}" + fi echo -n "* (Default: ${track_init}) Type number of track: " ; read track_file - if [ -z "${track_file}" ] ; then - track_num="${track_init}" - else - track_num="${track_file}" - fi + if [ -z "${track_file}" ] ; then + track_num="${track_init}" + else + track_num="${track_file}" + fi echo -n "* (Default: ${artist_init}) Type name of artist: " ; read artist_file - if [ -z "${artist_file}" ] ; then - artist_title="${artist_init}" - else - artist_title="${artist_file}" - artist_init="${artist_file}" - fi + if [ -z "${artist_file}" ] ; then + artist_title="${artist_init}" + else + artist_title="${artist_file}" + artist_init="${artist_file}" + fi # Check audio 5.1 or 7.1 audio_5_7_1=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "5.1") audio_5_7_1_2=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "7.1") @@ -301,6 +301,6 @@ else # Increment variables convert_files=$(expr ${convert_files} + 1) track_init=$(expr ${track_num} + 1) - done - fi + done + fi fi diff --git a/src/ks-upa b/src/ks-upa index d470d36..02a8932 100755 --- a/src/ks-upa +++ b/src/ks-upa @@ -2,12 +2,12 @@ ##################################################################### # ks-upa (ks-tools) - Upload audio file(s) to server with rsync+ssh # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ##################################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters. dirTemp="/tmp" @@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools" ksToolsTempFolder="/tmp/ks-tools" # Function to remove spaces and symbols -# Sintaxis: convertText "" +# Syntax: convertText "" function convertText() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -45,7 +45,7 @@ function convertText() { } # Function to list the files of a directory. -# Sintax: listArchives +# Syntax: listArchives function listArchives() { fail=1 formatFiles="mp3 wma ogg wav flac midi acc oga opus mp2 ra m4a mka" @@ -95,7 +95,7 @@ function countArchives() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileNoExtension=$(echo $FileName | cut -d "." -f 1) @@ -107,21 +107,21 @@ function showFileWithSpace() { } # Function to show the name of the file. -# Sintax: showFile +# Syntax: showFile function showFile() { archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) echo ${archive} } # Function to show full file path. -# Sintax: showPathFile +# Syntax: showPathFile function showPathFile() { pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1) echo ${pathFile} } # Function to send file to server. -# Sintax: sendFile [file name] +# Syntax: sendFile [file name] function sendFile() { correct=0 countSend=0 @@ -148,7 +148,7 @@ function sendFile() { } # Function to check local and server checksum. -# Sintax: checkChecksum +# Syntax: checkChecksum function checkChecksum() { correct=0 countChecksum=0 @@ -280,7 +280,7 @@ function showHelp() { echo "" echo "- Upload audio file(s) to server with rsync+ssh" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " $ ks-upa -i - Start upload" echo " $ ks-upa -r - Remove configuration" @@ -357,16 +357,16 @@ fi # Show configuration file if [ "$1" == "-c" ] ; then showConfig -# Show configuration file + # Show configuration file elif [ "$1" == "-e" ] ; then editConfig -# Show the version + # Show the version elif [ "$1" == "-v" ] ; then showVersion -# Show the help + # Show the help elif [ "$1" == "-h" ] ; then showHelp -# Init + # Init elif [ "$1" == "-i" ] ; then # Start script clear @@ -438,7 +438,7 @@ elif [ "$1" == "-i" ] ; then echo "" exit fi -# Show help + # Show help else showHelp fi diff --git a/src/ks-upf b/src/ks-upf index 3a1e1fd..c2a0f0f 100755 --- a/src/ks-upf +++ b/src/ks-upf @@ -2,12 +2,12 @@ ###################################################################### # ks-upf (ks-tools) - Upload common file(s) to server with rsync+ssh # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ###################################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters. dirTemp="/tmp" @@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools" ksToolsTempFolder="/tmp/ks-tools" # Function to remove spaces and symbols -# Sintaxis: convertText "" +# Syntax: convertText "" function convertText() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -45,7 +45,7 @@ function convertText() { } # Function to list the files of a directory. -# Sintax: listArchives +# Syntax: listArchives function listArchives() { fail=1 formatFiles="" @@ -113,7 +113,7 @@ function countArchives() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileNoExtension=$(echo $FileName | cut -d "." -f 1) @@ -125,21 +125,21 @@ function showFileWithSpace() { } # Function to show the name of the file. -# Sintax: showFile +# Syntax: showFile function showFile() { archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) echo ${archive} } # Function to show full file path. -# Sintax: showPathFile +# Syntax: showPathFile function showPathFile() { pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1) echo ${pathFile} } # Function to send file to server. -# Sintax: sendFile [file name] +# Syntax: sendFile [file name] function sendFile() { correct=0 countSend=0 @@ -166,7 +166,7 @@ function sendFile() { } # Function to check local and server checksum. -# Sintax: checkChecksum +# Syntax: checkChecksum function checkChecksum() { correct=0 countChecksum=0 @@ -298,7 +298,7 @@ function showHelp() { echo "" echo "- Upload common file(s) to server with rsync+ssh" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " $ ks-upf -i - Start upload" echo " $ ks-upf -r - Remove configuration" @@ -375,16 +375,16 @@ fi # Show configuration file if [ "$1" == "-c" ] ; then showConfig -# Show configuration file + # Show configuration file elif [ "$1" == "-e" ] ; then editConfig -# Show the version + # Show the version elif [ "$1" == "-v" ] ; then showVersion -# Show the help + # Show the help elif [ "$1" == "-h" ] ; then showHelp -# Init + # Init elif [ "$1" == "-i" ] ; then # Start script clear @@ -456,7 +456,7 @@ elif [ "$1" == "-i" ] ; then echo "" exit fi -# Show help + # Show help else showHelp fi diff --git a/src/ks-upr b/src/ks-upr index 1ea0465..854bddb 100755 --- a/src/ks-upr +++ b/src/ks-upr @@ -2,12 +2,12 @@ ########################################################################### # ks-upr (ks-tools) - Upload recursively file(s) to server with rsync+ssh # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ########################################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters. dirTemp="/tmp" @@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools" ksToolsTempFolder="/tmp/ks-tools" # Function to remove spaces and symbols -# Sintaxis: convertText "" +# Syntax: convertText "" function convertText() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -45,7 +45,7 @@ function convertText() { } # Function to list the files of a directory. -# Sintax: listArchives +# Syntax: listArchives function listArchives() { fail=1 formatFiles="" @@ -113,7 +113,7 @@ function countArchives() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileNoExtension=$(echo $FileName | cut -d "." -f 1) @@ -125,21 +125,21 @@ function showFileWithSpace() { } # Function to show the name of the file. -# Sintax: showFile +# Syntax: showFile function showFile() { archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) echo ${archive} } # Function to show full file path. -# Sintax: showPathFile +# Syntax: showPathFile function showPathFile() { pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1) echo ${pathFile} } # Function to send file to server. -# Sintax: sendFile [file name] +# Syntax: sendFile [file name] function sendFile() { #sshpass -p ${1} scp ${2} ${3}@${4}:${5} &> /dev/null comandOne="sshpass -p ${1} rsync -azlr -e" @@ -254,7 +254,7 @@ function showHelp() { echo "" echo "- Upload recursively file(s) to server with rsync+ssh" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " $ ks-upf -i - Start upload" echo " $ ks-upf -r - Remove configuration" diff --git a/src/ks-upv b/src/ks-upv index 1edd3f3..860c586 100755 --- a/src/ks-upv +++ b/src/ks-upv @@ -2,12 +2,12 @@ ###################################################################### # ks-upv (ks-tools) - Upload videos file(s) to server with rynsc+ssh # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ###################################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Global parameters. dirTemp="/tmp" @@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools" ksToolsTempFolder="/tmp/ks-tools" # Function to remove spaces and symbols -# Sintaxis: convertText "" +# Syntax: convertText "" function convertText() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -45,7 +45,7 @@ function convertText() { } # Function to list the files of a directory. -# Sintax: listArchives +# Syntax: listArchives function listArchives() { fail=1 formatFiles="mp4 avi mpg mpeg mov wmv mkv ogv webm rm flv vob ts" @@ -95,7 +95,7 @@ function countArchives() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileNoExtension=$(echo $FileName | cut -d "." -f 1) @@ -107,21 +107,21 @@ function showFileWithSpace() { } # Function to show the name of the file. -# Sintax: showFile +# Syntax: showFile function showFile() { archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) echo ${archive} } # Function to show full file path. -# Sintax: showPathFile +# Syntax: showPathFile function showPathFile() { pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1) echo ${pathFile} } # Function to send file to server. -# Sintax: sendFile [file name] +# Syntax: sendFile [file name] function sendFile() { correct=0 countSend=0 @@ -148,7 +148,7 @@ function sendFile() { } # Function to check local and server checksum. -# Sintax: checkChecksum +# Syntax: checkChecksum function checkChecksum() { correct=0 countChecksum=0 @@ -280,7 +280,7 @@ function showHelp() { echo "" echo "- Upload videos file(s) to server with rynsc+ssh" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " $ ks-upv -i - Start upload" echo " $ ks-upv -r - Remove configuration" diff --git a/src/ks-vob b/src/ks-vob index 9558243..e7385b8 100755 --- a/src/ks-vob +++ b/src/ks-vob @@ -2,12 +2,12 @@ ############################################################### # ks-avi (ks-tools) - Convert video to VOB DVD Format # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Basic parameters rel_size="720x480" @@ -30,13 +30,13 @@ if [ ${error_ffmpeg} -ne 0 ] ; then exit fi -# Sintax: ks-vob -f +# Syntax: ks-vob -f if [ -z "${1}" ] ; then echo "" echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})" echo "" echo "- Convert video file(s) to compact and efficient VOB" - echo "" + echo "" echo "+ Config:" echo "" echo " - Resolution: ${rel_size}" @@ -48,7 +48,7 @@ if [ -z "${1}" ] ; then echo " - Split: 30 minutes" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-vob " echo @@ -76,7 +76,7 @@ if [ -z "${2}" ] ; then echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})" echo "" echo "- Convert video file(s) to compact and efficient VOB" - echo "" + echo "" echo "+ Config:" echo "" echo " - Resolution: ${rel_size}" @@ -88,7 +88,7 @@ if [ -z "${2}" ] ; then echo " - Split: 30 minutes" echo " - Container: ${v_ext}" echo "" - echo "+ Sintax: " + echo "+ Syntax: " echo "" echo " $ ks-vob " echo diff --git a/wrapper/ks-avi-wrapper b/wrapper/ks-avi-wrapper index bd369c6..b63dae1 100755 --- a/wrapper/ks-avi-wrapper +++ b/wrapper/ks-avi-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-avi-wrapper (ks-tools) - Wrapper for ks-avi # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Conversion parameters ks_mp4_to_wrap="/usr/bin/ks-avi" @@ -45,7 +45,7 @@ else fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -65,7 +65,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -89,7 +89,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -99,7 +99,7 @@ function showFileWithSpace() { } # Show info tracks of input video video file. -# Sintax: showInfo +# Syntax: showInfo function showInfo() { echo "" echo "* Information of ${1}:" @@ -117,7 +117,7 @@ function showInfo() { } # Show the video track default -# Sintax: showVideoDefault +# Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -135,7 +135,7 @@ function showVideoDefault() { } # Show the audio track default -# Sintax: showAudioDefault +# Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -163,7 +163,7 @@ function showAudioDefault() { } # Show the subtitle track default -# Sintax: showSubtitleDefault +# Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -201,20 +201,20 @@ function showSubtitleDefault() { } # Show default resolution -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showResolutionDefault() { echo "${rel_size}" } # Show default year (METADATA) -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showYearDefault() { current_date=$(date +%Y) echo "${current_date}" } # Show the name title default (MEDATA) -# Sintax: showNameDefault +# Syntax: showNameDefault function showNameDefault() { # Prepare name title by default FullPath="${1}" @@ -225,7 +225,7 @@ function showNameDefault() { } # Show the genre default (MEDATA) -# Sintax: showGenreDefault +# Syntax: showGenreDefault function showGenreDefault() { echo "Unknown" } @@ -237,7 +237,7 @@ function showHelp() { echo "" echo "- Wrapper for ks-avi to create graphical interfaces" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " * TRACKS/CONFIG DETECT:" echo "" diff --git a/wrapper/ks-mp4-wrapper b/wrapper/ks-mp4-wrapper index ab78706..30037e4 100755 --- a/wrapper/ks-mp4-wrapper +++ b/wrapper/ks-mp4-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-mp4-wrapper (ks-tools) - Wrapper for ks-mp4 # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Conversion parameters ks_mp4_to_wrap="/usr/bin/ks-mp4" @@ -45,7 +45,7 @@ else fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -65,7 +65,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -89,7 +89,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -99,7 +99,7 @@ function showFileWithSpace() { } # Show info tracks of input video video file. -# Sintax: showInfo +# Syntax: showInfo function showInfo() { echo "" echo "* Information of ${1}:" @@ -117,7 +117,7 @@ function showInfo() { } # Show the video track default -# Sintax: showVideoDefault +# Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -135,7 +135,7 @@ function showVideoDefault() { } # Show the audio track default -# Sintax: showAudioDefault +# Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -163,7 +163,7 @@ function showAudioDefault() { } # Show the subtitle track default -# Sintax: showSubtitleDefault +# Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -201,20 +201,20 @@ function showSubtitleDefault() { } # Show default resolution -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showResolutionDefault() { echo "${rel_size}" } # Show default year (METADATA) -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showYearDefault() { current_date=$(date +%Y) echo "${current_date}" } # Show the name title default (MEDATA) -# Sintax: showNameDefault +# Syntax: showNameDefault function showNameDefault() { # Prepare name title by default FullPath="${1}" @@ -225,7 +225,7 @@ function showNameDefault() { } # Show the genre default (MEDATA) -# Sintax: showGenreDefault +# Syntax: showGenreDefault function showGenreDefault() { echo "Unknown" } @@ -237,7 +237,7 @@ function showHelp() { echo "" echo "- Wrapper for ks-mp4 to create graphical interfaces" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " * TRACKS/CONFIG DETECT:" echo "" diff --git a/wrapper/ks-mp4k-wrapper b/wrapper/ks-mp4k-wrapper index 551c31f..436b4dc 100755 --- a/wrapper/ks-mp4k-wrapper +++ b/wrapper/ks-mp4k-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-mp4k-wrapper (ks-tools) - Wrapper for ks-mp4k # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Conversion parameters ks_mp4_to_wrap="/usr/bin/ks-mp4k" @@ -45,7 +45,7 @@ else fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -65,7 +65,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -89,7 +89,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -99,7 +99,7 @@ function showFileWithSpace() { } # Show info tracks of input video video file. -# Sintax: showInfo +# Syntax: showInfo function showInfo() { echo "" echo "* Information of ${1}:" @@ -117,7 +117,7 @@ function showInfo() { } # Show the video track default -# Sintax: showVideoDefault +# Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -135,7 +135,7 @@ function showVideoDefault() { } # Show the audio track default -# Sintax: showAudioDefault +# Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -163,7 +163,7 @@ function showAudioDefault() { } # Show the subtitle track default -# Sintax: showSubtitleDefault +# Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -201,20 +201,20 @@ function showSubtitleDefault() { } # Show default resolution -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showResolutionDefault() { echo "${rel_size}" } # Show default year (METADATA) -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showYearDefault() { current_date=$(date +%Y) echo "${current_date}" } # Show the name title default (MEDATA) -# Sintax: showNameDefault +# Syntax: showNameDefault function showNameDefault() { # Prepare name title by default FullPath="${1}" @@ -225,7 +225,7 @@ function showNameDefault() { } # Show the genre default (MEDATA) -# Sintax: showGenreDefault +# Syntax: showGenreDefault function showGenreDefault() { echo "Unknown" } @@ -237,7 +237,7 @@ function showHelp() { echo "" echo "- Wrapper for ks-mp4k to create graphical interfaces" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " * TRACKS/CONFIG DETECT:" echo "" diff --git a/wrapper/ks-mp4s-wrapper b/wrapper/ks-mp4s-wrapper index b5dc179..75431a6 100755 --- a/wrapper/ks-mp4s-wrapper +++ b/wrapper/ks-mp4s-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-mp4s-wrapper (ks-tools) - Wrapper for ks-mp4s # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Conversion parameters ks_mp4_to_wrap="/usr/bin/ks-mp4s" @@ -45,7 +45,7 @@ else fi # Funcion to show the name of file/folder from full path -# Sintax: extractFolderOrFile +# Syntax: extractFolderOrFile function extractFolderOrFile() { pathToExtract="${1}/" findFolder=0 @@ -65,7 +65,7 @@ function extractFolderOrFile() { } # Function to remove extension from file -# Sintax: removeExtension "" +# Syntax: removeExtension "" function removeExtension() { wordToConvert=${1} ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" @@ -89,7 +89,7 @@ function removeExtension() { } # Function to show files with spaces. -# Sintax: showFileWithSpace +# Syntax: showFileWithSpace function showFileWithSpace() { echo "${1}" > ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp @@ -99,7 +99,7 @@ function showFileWithSpace() { } # Show info tracks of input video video file. -# Sintax: showInfo +# Syntax: showInfo function showInfo() { echo "" echo "* Information of ${1}:" @@ -117,7 +117,7 @@ function showInfo() { } # Show the video track default -# Sintax: showVideoDefault +# Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -135,7 +135,7 @@ function showVideoDefault() { } # Show the audio track default -# Sintax: showAudioDefault +# Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -163,7 +163,7 @@ function showAudioDefault() { } # Show the subtitle track default -# Sintax: showSubtitleDefault +# Syntax: showSubtitleDefault function showSubtitleDefault() { # Check the subtitle track by default subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -201,20 +201,20 @@ function showSubtitleDefault() { } # Show default resolution -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showResolutionDefault() { echo "${rel_size}" } # Show default year (METADATA) -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showYearDefault() { current_date=$(date +%Y) echo "${current_date}" } # Show the name title default (MEDATA) -# Sintax: showNameDefault +# Syntax: showNameDefault function showNameDefault() { # Prepare name title by default FullPath="${1}" @@ -225,7 +225,7 @@ function showNameDefault() { } # Show the genre default (MEDATA) -# Sintax: showGenreDefault +# Syntax: showGenreDefault function showGenreDefault() { echo "Unknown" } @@ -237,7 +237,7 @@ function showHelp() { echo "" echo "- Wrapper for ks-mp4s to create graphical interfaces" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " * TRACKS/CONFIG DETECT:" echo "" diff --git a/wrapper/ks-vob-wrapper b/wrapper/ks-vob-wrapper index 2cc8f29..4bc8232 100755 --- a/wrapper/ks-vob-wrapper +++ b/wrapper/ks-vob-wrapper @@ -2,12 +2,12 @@ ############################################################### # ks-vob-wrapper (ks-tools) - Wrapper for ks-vob # -# Date: 10-03-2021 # +# Date: 22-03-2021 # # Author: q3aql # # Contact: q3aql@protonmail.ch # ############################################################### -VERSION="6.7" -M_DATE="100321" +VERSION="6.8" +M_DATE="220321" # Conversion parameters ks_mp4_to_wrap="/usr/bin/ks-vob" @@ -40,7 +40,7 @@ else fi # Show info tracks of input video video file. -# Sintax: showInfo +# Syntax: showInfo function showInfo() { echo "" echo "* Information of ${1}:" @@ -55,7 +55,7 @@ function showInfo() { } # Show the video track default -# Sintax: showVideoDefault +# Syntax: showVideoDefault function showVideoDefault() { # Check de video track by default video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -73,7 +73,7 @@ function showVideoDefault() { } # Show the audio track default -# Sintax: showAudioDefault +# Syntax: showAudioDefault function showAudioDefault() { # Check the audio track by default audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1) @@ -101,7 +101,7 @@ function showAudioDefault() { } # Show default resolution -# Sintax: showResolutionDefault +# Syntax: showResolutionDefault function showResolutionDefault() { echo "${rel_size}" } @@ -113,7 +113,7 @@ function showHelp() { echo "" echo "- Wrapper for ks-vob to create graphical interfaces" echo "" - echo "+ Sintax:" + echo "+ Syntax:" echo "" echo " * TRACKS/CONFIG DETECT:" echo ""