Bump up version number to 6.8

This commit is contained in:
q3aql 2021-03-22 19:01:31 +01:00
parent 823f921e3d
commit 4c1b6d0fbd
29 changed files with 360 additions and 359 deletions

View File

@ -1,6 +1,6 @@
@echo off @echo off
set VERSION=6.7 set VERSION=6.8
echo. echo.
echo ##################################### echo #####################################
echo # Welcome to ks-tools installer %VERSION% # echo # Welcome to ks-tools installer %VERSION% #

View File

@ -2,12 +2,12 @@
rem ###################################### rem ######################################
rem # ks-tools for Windows # rem # ks-tools for Windows #
rem # U. Modificacion: 10-03-2021 # rem # U. Modificacion: 22-03-2021 #
rem # Author: q3aql # rem # Author: q3aql #
rem # Contact: q3aql@protonmail.ch # rem # Contact: q3aql@protonmail.ch #
rem # License: GPL v2.0 # rem # License: GPL v2.0 #
rem ###################################### rem ######################################
set VERSION=6.7 set VERSION=6.8
rem # Start ks-tools terminal (bash) rem # Start ks-tools terminal (bash)
mkdir home\%USERNAME% mkdir home\%USERNAME%

View File

@ -2,12 +2,12 @@
rem ###################################### rem ######################################
rem # ks-tools for Windows # rem # ks-tools for Windows #
rem # U. Modificacion: 10-03-2021 # rem # U. Modificacion: 22-03-2021 #
rem # Author: q3aql # rem # Author: q3aql #
rem # Contact: q3aql@protonmail.ch # rem # Contact: q3aql@protonmail.ch #
rem # License: GPL v2.0 # rem # License: GPL v2.0 #
rem ###################################### rem ######################################
set VERSION=6.7 set VERSION=6.8
rem # Start ks-tools ZUI (bash) rem # Start ks-tools ZUI (bash)
mkdir home\%USERNAME% mkdir home\%USERNAME%

View File

@ -2,12 +2,12 @@
################################################################# #################################################################
# ks-zui (ks-tools) - Simple zenity user interface for ks-tools # # ks-zui (ks-tools) - Simple zenity user interface for ks-tools #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
################################################################# #################################################################
VERSION="6.7 (BETA)" VERSION="6.8 (BETA)"
M_DATE="100321" M_DATE="220321"
# Function to show about # Function to show about
function showAbout() { function showAbout() {

View File

@ -2,12 +2,12 @@
################################################################# #################################################################
# ks-zui (ks-tools) - Simple zenity user interface for ks-tools # # ks-zui (ks-tools) - Simple zenity user interface for ks-tools #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
################################################################# #################################################################
VERSION="6.7 (BETA)" VERSION="6.8 (BETA)"
M_DATE="100321" M_DATE="220321"
# Function to show about # Function to show about
function showAbout() { function showAbout() {
@ -17,7 +17,7 @@ function showAbout() {
} }
# Function to show information of video file # Function to show information of video file
# Sintax: showVideoInfo # Syntax: showVideoInfo
function showVideoInfo() { function showVideoInfo() {
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
| Select the video file" --file-selection) | Select the video file" --file-selection)
@ -28,7 +28,7 @@ function showVideoInfo() {
} }
# Function to convert MP4 with subs # Function to convert MP4 with subs
# Sintax: convertMP4WithSub # Syntax: convertMP4WithSub
function convertMP4WithSub() { function convertMP4WithSub() {
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
| Select the video file" --file-selection) | Select the video file" --file-selection)
@ -84,7 +84,7 @@ function convertMP4WithSub() {
} }
# Function to convert MP4 # Function to convert MP4
# Sintax: convertMP4 # Syntax: convertMP4
function convertMP4() { function convertMP4() {
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
| Select the video file" --file-selection) | Select the video file" --file-selection)
@ -137,7 +137,7 @@ function convertMP4() {
} }
# Function to convert AVI with subs # Function to convert AVI with subs
# Sintax: convertAVIWithSub # Syntax: convertAVIWithSub
function convertAVIWithSub() { function convertAVIWithSub() {
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
| Select the video file" --file-selection) | Select the video file" --file-selection)
@ -193,7 +193,7 @@ function convertAVIWithSub() {
} }
# Function to convert AVI # Function to convert AVI
# Sintax: convertAVIW # Syntax: convertAVIW
function convertAVI() { function convertAVI() {
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
| Select the video file" --file-selection) | Select the video file" --file-selection)
@ -246,7 +246,7 @@ function convertAVI() {
} }
# Function to convert VOB # Function to convert VOB
# Sintax: convertVOB # Syntax: convertVOB
function convertVOB() { function convertVOB() {
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \ videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
| Select the video file" --file-selection) | Select the video file" --file-selection)

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-tools - Initialize the ks-tools terminal (using xterm) # # ks-tools - Initialize the ks-tools terminal (using xterm) #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Variables # Variables
name_terminal="ks-tools v${VERSION} (${M_DATE})" name_terminal="ks-tools v${VERSION} (${M_DATE})"

View File

@ -114,12 +114,12 @@ fi
echo "" echo ""
echo " #################################" echo " #################################"
echo " # ks-tools 6.7 (for Unix/Linux) #" echo " # ks-tools 6.8 (for Unix/Linux) #"
echo " #################################" echo " #################################"
echo "" echo ""
echo " * Available commands:" echo " * Available commands:"
echo "" echo ""
echo " - ks-upv - ks-vob" echo " - ks-upv - ks-crop"
echo " - ks-upa - ks-oga" echo " - ks-upa - ks-oga"
echo " - ks-upf - ks-oga-album" echo " - ks-upf - ks-oga-album"
echo " - ks-upr - ks-mp4-wrapper" echo " - ks-upr - ks-mp4-wrapper"
@ -129,4 +129,5 @@ echo " - ks-mp4s - ks-mp4k-wrapper"
echo " - ks-mix - ks-mp4s-wrapper" echo " - ks-mix - ks-mp4s-wrapper"
echo " - ks-avi - ks-mp4s-folder" echo " - ks-avi - ks-mp4s-folder"
echo " - ks-mp3 - ks-mp3-album" echo " - ks-mp3 - ks-mp3-album"
echo " - ks-vob"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-tools - Initialize the ks-tools ZUI (using xterm) # # ks-tools - Initialize the ks-tools ZUI (using xterm) #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7 (BETA)" VERSION="6.8 (BETA)"
M_DATE="100321" M_DATE="220321"
# Variables # Variables
name_terminal="ks-tools v${VERSION} (${M_DATE})" name_terminal="ks-tools v${VERSION} (${M_DATE})"

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-avi (ks-tools) - Convert video to AVI format # # ks-avi (ks-tools) - Convert video to AVI format #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters # Global parameters
dirTemp="/tmp" dirTemp="/tmp"
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -60,7 +60,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -84,7 +84,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -93,7 +93,7 @@ function showFileWithSpace() {
echo ${DisplayName} echo ${DisplayName}
} }
# Sintax: ks-avi </absolute/path/video.mkv> </path/prefix_name> # Syntax: ks-avi </absolute/path/video.mkv> </path/prefix_name>
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-avi (ks-tools) v${VERSION} (${M_DATE})" 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 " - Default Subtitle: ${default_lang_subt} (forced)"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-avi </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-avi </absolute/path/video.mkv> </path/prefix_name>"
echo "" echo ""
@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then
echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Default Subtitle: ${default_lang_subt} (forced)"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-avi </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-avi </absolute/path/video.mkv> </path/prefix_name>"
echo "" echo ""

View File

@ -6,7 +6,7 @@
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="220321" M_DATE="220321"
# Global parameters # Global parameters

View File

@ -2,12 +2,12 @@
##################################################################### #####################################################################
# ks-mix (ks-tools) - Extract video/audio and mix video/audio files # # ks-mix (ks-tools) - Extract video/audio and mix video/audio files #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
##################################################################### #####################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# File(s) detection # File(s) detection
current_dir=$(pwd) current_dir=$(pwd)
@ -51,7 +51,7 @@ else
subs_found="NOT FOUND" subs_found="NOT FOUND"
fi fi
# Function to show menu again when sintax is wrong # Function to show menu again when Syntax is wrong
function show_menu() { function show_menu() {
echo "" echo ""
echo "* ks-mix (ks-tools) v${VERSION} (${M_DATE})" 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 " + Audio file: ${audio_file_dir} (${audio_found})"
echo " + Subs file: ${subs_file_dir} (${subs_found})" echo " + Subs file: ${subs_file_dir} (${subs_found})"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mix -evid <video-file> --> Extract video track" echo " $ ks-mix -evid <video-file> --> Extract video track"
echo " $ ks-mix -ev25 <video-file> --> Extract video track to 25 fps (only for H264)" echo " $ ks-mix -ev25 <video-file> --> Extract video track to 25 fps (only for H264)"
@ -81,7 +81,7 @@ function show_menu() {
exit exit
} }
# Show menu and sintax # Show menu and Syntax
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
show_menu show_menu
elif [ "${1}" == "-evid" ] ; then elif [ "${1}" == "-evid" ] ; then

View File

@ -2,12 +2,12 @@
######################################################################### #########################################################################
# ks-mp3 (ks-tools) - Convert video/audio file(s) to MP3 (Audio) Format # # ks-mp3 (ks-tools) - Convert video/audio file(s) to MP3 (Audio) Format #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
######################################################################### #########################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters # Global parameters
dirTemp="/tmp" dirTemp="/tmp"
@ -33,7 +33,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -53,7 +53,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -86,7 +86,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -109,7 +109,7 @@ function showFileWithSpace() {
echo ${DisplayName} echo ${DisplayName}
} }
# Sintax: ks-mp3 </absolute/path/song.ogg> </path/prefix_name> # Syntax: ks-mp3 </absolute/path/song.ogg> </path/prefix_name>
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-mp3 (ks-tools) v${VERSION} (${M_DATE})" echo "* ks-mp3 (ks-tools) v${VERSION} (${M_DATE})"
@ -122,7 +122,7 @@ if [ -z "${1}" ] ; then
echo " - Bitrate audio: ${b_acodec}" echo " - Bitrate audio: ${b_acodec}"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>" echo " $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>"
echo "" echo ""
@ -158,7 +158,7 @@ if [ -z "${2}" ] ; then
echo " - Bitrate audio: ${b_acodec}" echo " - Bitrate audio: ${b_acodec}"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>" echo " $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>"
echo "" echo ""

View File

@ -2,12 +2,12 @@
###################################################################### ######################################################################
# ks-mp3-album (ks-tools) - Convert folder album to MP3 Audio Format # # ks-mp3-album (ks-tools) - Convert folder album to MP3 Audio Format #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
###################################################################### ######################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Variables # Variables
tempFile="/tmp/ks-mp4s-folder.txt" tempFile="/tmp/ks-mp4s-folder.txt"
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -60,7 +60,7 @@ function extractFolderOrFile() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -84,7 +84,7 @@ function showFileWithSpace() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -116,7 +116,7 @@ function removeExtension() {
echo ${wordToConvert} echo ${wordToConvert}
} }
# Sintax: ks-mp3-album </absolute/path/album/ # Syntax: ks-mp3-album </absolute/path/album/
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})" echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})"
@ -129,7 +129,7 @@ if [ -z "${1}" ] ; then
echo " - Bitrate audio: ${b_acodec}" echo " - Bitrate audio: ${b_acodec}"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp3 </absolute/path/album>" echo " $ ks-mp3 </absolute/path/album>"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-mp4 (ks-tools) - Convert video to MP4 format # # ks-mp4 (ks-tools) - Convert video to MP4 format #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters # Global parameters
dirTemp="/tmp" dirTemp="/tmp"
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -60,7 +60,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -84,7 +84,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -93,7 +93,7 @@ function showFileWithSpace() {
echo ${DisplayName} echo ${DisplayName}
} }
# Sintax: ks-mp4 </absolute/path/video.mkv> </path/prefix_name> # Syntax: ks-mp4 </absolute/path/video.mkv> </path/prefix_name>
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-mp4 (ks-tools) v${VERSION} (${M_DATE})" 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 " - Default Subtitle: ${default_lang_subt} (forced)"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>"
echo "" echo ""
@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then
echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Default Subtitle: ${default_lang_subt} (forced)"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-mp4k (ks-tools) - Convert video to MP4 format (4K) # # ks-mp4k (ks-tools) - Convert video to MP4 format (4K) #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters # Global parameters
dirTemp="/tmp" dirTemp="/tmp"
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -60,7 +60,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -84,7 +84,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -93,7 +93,7 @@ function showFileWithSpace() {
echo ${DisplayName} echo ${DisplayName}
} }
# Sintax: ks-mp4k </absolute/path/video.mkv> </path/prefix_name> # Syntax: ks-mp4k </absolute/path/video.mkv> </path/prefix_name>
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-mp4k (ks-tools) v${VERSION} (${M_DATE})" 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 " - Default Subtitle: ${default_lang_subt} (forced)"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>"
echo "" echo ""
@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then
echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Default Subtitle: ${default_lang_subt} (forced)"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-mp4s (ks-tools) - Convert video to MP4 format (Series) # # ks-mp4s (ks-tools) - Convert video to MP4 format (Series) #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters # Global parameters
dirTemp="/tmp" dirTemp="/tmp"
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -60,7 +60,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -84,7 +84,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -93,7 +93,7 @@ function showFileWithSpace() {
echo ${DisplayName} echo ${DisplayName}
} }
# Sintax: ks-mp4s </absolute/path/video.mkv> </path/prefix_name> # Syntax: ks-mp4s </absolute/path/video.mkv> </path/prefix_name>
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-mp4s (ks-tools) v${VERSION} (${M_DATE})" 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 " - Default Subtitle: ${default_lang_subt} (forced)"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>"
echo "" echo ""
@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then
echo " - Default Subtitle: ${default_lang_subt} (forced)" echo " - Default Subtitle: ${default_lang_subt} (forced)"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>"
echo "" echo ""

View File

@ -2,12 +2,12 @@
################################################################################# #################################################################################
# ks-mp4s-folder (ks-tools) - Convert videos from folder to MP4 format (Series) # # ks-mp4s-folder (ks-tools) - Convert videos from folder to MP4 format (Series) #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
################################################################################# #################################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Variables # Variables
tempFile="/tmp/ks-mp4s-folder.txt" tempFile="/tmp/ks-mp4s-folder.txt"
@ -21,7 +21,7 @@ if [ -z "${1}" ] ; then
echo "" echo ""
echo "- Convert videos from folder to MP4 format (Series)" echo "- Convert videos from folder to MP4 format (Series)"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-mp4s-folder </path/folder> [subs]" echo " $ ks-mp4s-folder </path/folder> [subs]"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################################# #############################################################################
# ks-oga (ks-tools) - Convert video/audio file(s) to OGA (OGG Audio) Format # # ks-oga (ks-tools) - Convert video/audio file(s) to OGA (OGG Audio) Format #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################################# #############################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters # Global parameters
dirTemp="/tmp" dirTemp="/tmp"
@ -33,7 +33,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -53,7 +53,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -86,7 +86,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -109,7 +109,7 @@ function showFileWithSpace() {
echo ${DisplayName} echo ${DisplayName}
} }
# Sintax: ks-oga </absolute/path/song.mp3> </path/prefix_name> # Syntax: ks-oga </absolute/path/song.mp3> </path/prefix_name>
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-oga (ks-tools) v${VERSION} (${M_DATE})" echo "* ks-oga (ks-tools) v${VERSION} (${M_DATE})"
@ -122,7 +122,7 @@ if [ -z "${1}" ] ; then
echo " - Bitrate audio: ${b_acodec}" echo " - Bitrate audio: ${b_acodec}"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-oga </absolute/path/song.mp3> </path/prefix_name>" echo " $ ks-oga </absolute/path/song.mp3> </path/prefix_name>"
echo "" echo ""
@ -158,7 +158,7 @@ if [ -z "${2}" ] ; then
echo " - Bitrate audio: ${b_acodec}" echo " - Bitrate audio: ${b_acodec}"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-oga </absolute/path/song.mp3> </path/prefix_name>" echo " $ ks-oga </absolute/path/song.mp3> </path/prefix_name>"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################################ ############################################################################
# ks-oga-album (ks-tools) - Convert folder album to OGA (OGG Audio) Format # # ks-oga-album (ks-tools) - Convert folder album to OGA (OGG Audio) Format #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################################ ############################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Variables # Variables
tempFile="/tmp/ks-mp4s-folder.txt" tempFile="/tmp/ks-mp4s-folder.txt"
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -60,7 +60,7 @@ function extractFolderOrFile() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -84,7 +84,7 @@ function showFileWithSpace() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -116,7 +116,7 @@ function removeExtension() {
echo ${wordToConvert} echo ${wordToConvert}
} }
# Sintax: ks-oga </absolute/path/song.mp3> </path/prefix_name> # Syntax: ks-oga </absolute/path/song.mp3> </path/prefix_name>
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})" echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})"
@ -129,7 +129,7 @@ if [ -z "${1}" ] ; then
echo " - Bitrate audio: ${b_acodec}" echo " - Bitrate audio: ${b_acodec}"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-oga </absolute/path/album>" echo " $ ks-oga </absolute/path/album>"
echo "" echo ""

View File

@ -2,12 +2,12 @@
##################################################################### #####################################################################
# ks-upa (ks-tools) - Upload audio file(s) to server with rsync+ssh # # ks-upa (ks-tools) - Upload audio file(s) to server with rsync+ssh #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
##################################################################### #####################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters. # Global parameters.
dirTemp="/tmp" dirTemp="/tmp"
@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools"
ksToolsTempFolder="/tmp/ks-tools" ksToolsTempFolder="/tmp/ks-tools"
# Function to remove spaces and symbols # Function to remove spaces and symbols
# Sintaxis: convertText "<text>" # Syntax: convertText "<text>"
function convertText() { function convertText() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -45,7 +45,7 @@ function convertText() {
} }
# Function to list the files of a directory. # Function to list the files of a directory.
# Sintax: listArchives <directory> # Syntax: listArchives <directory>
function listArchives() { function listArchives() {
fail=1 fail=1
formatFiles="mp3 wma ogg wav flac midi acc oga opus mp2 ra m4a mka" 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. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
FileNoExtension=$(echo $FileName | cut -d "." -f 1) FileNoExtension=$(echo $FileName | cut -d "." -f 1)
@ -107,21 +107,21 @@ function showFileWithSpace() {
} }
# Function to show the name of the file. # Function to show the name of the file.
# Sintax: showFile <file number> # Syntax: showFile <file number>
function showFile() { function showFile() {
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
echo ${archive} echo ${archive}
} }
# Function to show full file path. # Function to show full file path.
# Sintax: showPathFile <file number> # Syntax: showPathFile <file number>
function showPathFile() { function showPathFile() {
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1) pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
echo ${pathFile} echo ${pathFile}
} }
# Function to send file to server. # Function to send file to server.
# Sintax: sendFile <password> <file path> <user> <server> <server path> [file name] # Syntax: sendFile <password> <file path> <user> <server> <server path> [file name]
function sendFile() { function sendFile() {
correct=0 correct=0
countSend=0 countSend=0
@ -148,7 +148,7 @@ function sendFile() {
} }
# Function to check local and server checksum. # Function to check local and server checksum.
# Sintax: checkChecksum <password> <local file path> <user> <server> <server file path> # Syntax: checkChecksum <password> <local file path> <user> <server> <server file path>
function checkChecksum() { function checkChecksum() {
correct=0 correct=0
countChecksum=0 countChecksum=0
@ -280,7 +280,7 @@ function showHelp() {
echo "" echo ""
echo "- Upload audio file(s) to server with rsync+ssh" echo "- Upload audio file(s) to server with rsync+ssh"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " $ ks-upa -i - Start upload" echo " $ ks-upa -i - Start upload"
echo " $ ks-upa -r - Remove configuration" echo " $ ks-upa -r - Remove configuration"

View File

@ -2,12 +2,12 @@
###################################################################### ######################################################################
# ks-upf (ks-tools) - Upload common file(s) to server with rsync+ssh # # ks-upf (ks-tools) - Upload common file(s) to server with rsync+ssh #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
###################################################################### ######################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters. # Global parameters.
dirTemp="/tmp" dirTemp="/tmp"
@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools"
ksToolsTempFolder="/tmp/ks-tools" ksToolsTempFolder="/tmp/ks-tools"
# Function to remove spaces and symbols # Function to remove spaces and symbols
# Sintaxis: convertText "<text>" # Syntax: convertText "<text>"
function convertText() { function convertText() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -45,7 +45,7 @@ function convertText() {
} }
# Function to list the files of a directory. # Function to list the files of a directory.
# Sintax: listArchives <directory> # Syntax: listArchives <directory>
function listArchives() { function listArchives() {
fail=1 fail=1
formatFiles="" formatFiles=""
@ -113,7 +113,7 @@ function countArchives() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
FileNoExtension=$(echo $FileName | cut -d "." -f 1) FileNoExtension=$(echo $FileName | cut -d "." -f 1)
@ -125,21 +125,21 @@ function showFileWithSpace() {
} }
# Function to show the name of the file. # Function to show the name of the file.
# Sintax: showFile <file number> # Syntax: showFile <file number>
function showFile() { function showFile() {
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
echo ${archive} echo ${archive}
} }
# Function to show full file path. # Function to show full file path.
# Sintax: showPathFile <file number> # Syntax: showPathFile <file number>
function showPathFile() { function showPathFile() {
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1) pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
echo ${pathFile} echo ${pathFile}
} }
# Function to send file to server. # Function to send file to server.
# Sintax: sendFile <password> <file path> <user> <server> <server path> [file name] # Syntax: sendFile <password> <file path> <user> <server> <server path> [file name]
function sendFile() { function sendFile() {
correct=0 correct=0
countSend=0 countSend=0
@ -166,7 +166,7 @@ function sendFile() {
} }
# Function to check local and server checksum. # Function to check local and server checksum.
# Sintax: checkChecksum <password> <local file path> <user> <server> <server file path> # Syntax: checkChecksum <password> <local file path> <user> <server> <server file path>
function checkChecksum() { function checkChecksum() {
correct=0 correct=0
countChecksum=0 countChecksum=0
@ -298,7 +298,7 @@ function showHelp() {
echo "" echo ""
echo "- Upload common file(s) to server with rsync+ssh" echo "- Upload common file(s) to server with rsync+ssh"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " $ ks-upf -i - Start upload" echo " $ ks-upf -i - Start upload"
echo " $ ks-upf -r - Remove configuration" echo " $ ks-upf -r - Remove configuration"

View File

@ -2,12 +2,12 @@
########################################################################### ###########################################################################
# ks-upr (ks-tools) - Upload recursively file(s) to server with rsync+ssh # # ks-upr (ks-tools) - Upload recursively file(s) to server with rsync+ssh #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
########################################################################### ###########################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters. # Global parameters.
dirTemp="/tmp" dirTemp="/tmp"
@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools"
ksToolsTempFolder="/tmp/ks-tools" ksToolsTempFolder="/tmp/ks-tools"
# Function to remove spaces and symbols # Function to remove spaces and symbols
# Sintaxis: convertText "<text>" # Syntax: convertText "<text>"
function convertText() { function convertText() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -45,7 +45,7 @@ function convertText() {
} }
# Function to list the files of a directory. # Function to list the files of a directory.
# Sintax: listArchives <directory> # Syntax: listArchives <directory>
function listArchives() { function listArchives() {
fail=1 fail=1
formatFiles="" formatFiles=""
@ -113,7 +113,7 @@ function countArchives() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
FileNoExtension=$(echo $FileName | cut -d "." -f 1) FileNoExtension=$(echo $FileName | cut -d "." -f 1)
@ -125,21 +125,21 @@ function showFileWithSpace() {
} }
# Function to show the name of the file. # Function to show the name of the file.
# Sintax: showFile <file number> # Syntax: showFile <file number>
function showFile() { function showFile() {
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
echo ${archive} echo ${archive}
} }
# Function to show full file path. # Function to show full file path.
# Sintax: showPathFile <file number> # Syntax: showPathFile <file number>
function showPathFile() { function showPathFile() {
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1) pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
echo ${pathFile} echo ${pathFile}
} }
# Function to send file to server. # Function to send file to server.
# Sintax: sendFile <password> <file path> <user> <server> <server path> [file name] # Syntax: sendFile <password> <file path> <user> <server> <server path> [file name]
function sendFile() { function sendFile() {
#sshpass -p ${1} scp ${2} ${3}@${4}:${5} &> /dev/null #sshpass -p ${1} scp ${2} ${3}@${4}:${5} &> /dev/null
comandOne="sshpass -p ${1} rsync -azlr -e" comandOne="sshpass -p ${1} rsync -azlr -e"
@ -254,7 +254,7 @@ function showHelp() {
echo "" echo ""
echo "- Upload recursively file(s) to server with rsync+ssh" echo "- Upload recursively file(s) to server with rsync+ssh"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " $ ks-upf -i - Start upload" echo " $ ks-upf -i - Start upload"
echo " $ ks-upf -r - Remove configuration" echo " $ ks-upf -r - Remove configuration"

View File

@ -2,12 +2,12 @@
###################################################################### ######################################################################
# ks-upv (ks-tools) - Upload videos file(s) to server with rynsc+ssh # # ks-upv (ks-tools) - Upload videos file(s) to server with rynsc+ssh #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
###################################################################### ######################################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Global parameters. # Global parameters.
dirTemp="/tmp" dirTemp="/tmp"
@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools"
ksToolsTempFolder="/tmp/ks-tools" ksToolsTempFolder="/tmp/ks-tools"
# Function to remove spaces and symbols # Function to remove spaces and symbols
# Sintaxis: convertText "<text>" # Syntax: convertText "<text>"
function convertText() { function convertText() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -45,7 +45,7 @@ function convertText() {
} }
# Function to list the files of a directory. # Function to list the files of a directory.
# Sintax: listArchives <directory> # Syntax: listArchives <directory>
function listArchives() { function listArchives() {
fail=1 fail=1
formatFiles="mp4 avi mpg mpeg mov wmv mkv ogv webm rm flv vob ts" 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. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
FileNoExtension=$(echo $FileName | cut -d "." -f 1) FileNoExtension=$(echo $FileName | cut -d "." -f 1)
@ -107,21 +107,21 @@ function showFileWithSpace() {
} }
# Function to show the name of the file. # Function to show the name of the file.
# Sintax: showFile <file number> # Syntax: showFile <file number>
function showFile() { function showFile() {
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1) archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
echo ${archive} echo ${archive}
} }
# Function to show full file path. # Function to show full file path.
# Sintax: showPathFile <file number> # Syntax: showPathFile <file number>
function showPathFile() { function showPathFile() {
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1) pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
echo ${pathFile} echo ${pathFile}
} }
# Function to send file to server. # Function to send file to server.
# Sintax: sendFile <password> <file path> <user> <server> <server path> [file name] # Syntax: sendFile <password> <file path> <user> <server> <server path> [file name]
function sendFile() { function sendFile() {
correct=0 correct=0
countSend=0 countSend=0
@ -148,7 +148,7 @@ function sendFile() {
} }
# Function to check local and server checksum. # Function to check local and server checksum.
# Sintax: checkChecksum <password> <local file path> <user> <server> <server file path> # Syntax: checkChecksum <password> <local file path> <user> <server> <server file path>
function checkChecksum() { function checkChecksum() {
correct=0 correct=0
countChecksum=0 countChecksum=0
@ -280,7 +280,7 @@ function showHelp() {
echo "" echo ""
echo "- Upload videos file(s) to server with rynsc+ssh" echo "- Upload videos file(s) to server with rynsc+ssh"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " $ ks-upv -i - Start upload" echo " $ ks-upv -i - Start upload"
echo " $ ks-upv -r - Remove configuration" echo " $ ks-upv -r - Remove configuration"

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-avi (ks-tools) - Convert video to VOB DVD Format # # ks-avi (ks-tools) - Convert video to VOB DVD Format #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Basic parameters # Basic parameters
rel_size="720x480" rel_size="720x480"
@ -30,7 +30,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
exit exit
fi fi
# Sintax: ks-vob -f </absolute/path/video.mp4> </path/prefix_name> # Syntax: ks-vob -f </absolute/path/video.mp4> </path/prefix_name>
if [ -z "${1}" ] ; then if [ -z "${1}" ] ; then
echo "" echo ""
echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})" echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})"
@ -48,7 +48,7 @@ if [ -z "${1}" ] ; then
echo " - Split: 30 minutes" echo " - Split: 30 minutes"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-vob </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-vob </absolute/path/video.mkv> </path/prefix_name>"
echo echo
@ -88,7 +88,7 @@ if [ -z "${2}" ] ; then
echo " - Split: 30 minutes" echo " - Split: 30 minutes"
echo " - Container: ${v_ext}" echo " - Container: ${v_ext}"
echo "" echo ""
echo "+ Sintax: " echo "+ Syntax: "
echo "" echo ""
echo " $ ks-vob </absolute/path/video.mkv> </path/prefix_name>" echo " $ ks-vob </absolute/path/video.mkv> </path/prefix_name>"
echo echo

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-avi-wrapper (ks-tools) - Wrapper for ks-avi # # ks-avi-wrapper (ks-tools) - Wrapper for ks-avi #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Conversion parameters # Conversion parameters
ks_mp4_to_wrap="/usr/bin/ks-avi" ks_mp4_to_wrap="/usr/bin/ks-avi"
@ -45,7 +45,7 @@ else
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -65,7 +65,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -89,7 +89,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -99,7 +99,7 @@ function showFileWithSpace() {
} }
# Show info tracks of input video video file. # Show info tracks of input video video file.
# Sintax: showInfo <video_file> # Syntax: showInfo <video_file>
function showInfo() { function showInfo() {
echo "" echo ""
echo "* Information of ${1}:" echo "* Information of ${1}:"
@ -117,7 +117,7 @@ function showInfo() {
} }
# Show the video track default # Show the video track default
# Sintax: showVideoDefault <video_file> # Syntax: showVideoDefault <video_file>
function showVideoDefault() { function showVideoDefault() {
# Check de video track by default # 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) 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 # Show the audio track default
# Sintax: showAudioDefault <video_file> # Syntax: showAudioDefault <video_file>
function showAudioDefault() { function showAudioDefault() {
# Check the audio track by default # 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) 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 # Show the subtitle track default
# Sintax: showSubtitleDefault <video_file> # Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() { function showSubtitleDefault() {
# Check the subtitle track by default # 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) 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 # Show default resolution
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showResolutionDefault() { function showResolutionDefault() {
echo "${rel_size}" echo "${rel_size}"
} }
# Show default year (METADATA) # Show default year (METADATA)
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showYearDefault() { function showYearDefault() {
current_date=$(date +%Y) current_date=$(date +%Y)
echo "${current_date}" echo "${current_date}"
} }
# Show the name title default (MEDATA) # Show the name title default (MEDATA)
# Sintax: showNameDefault <video_file> # Syntax: showNameDefault <video_file>
function showNameDefault() { function showNameDefault() {
# Prepare name title by default # Prepare name title by default
FullPath="${1}" FullPath="${1}"
@ -225,7 +225,7 @@ function showNameDefault() {
} }
# Show the genre default (MEDATA) # Show the genre default (MEDATA)
# Sintax: showGenreDefault # Syntax: showGenreDefault
function showGenreDefault() { function showGenreDefault() {
echo "Unknown" echo "Unknown"
} }
@ -237,7 +237,7 @@ function showHelp() {
echo "" echo ""
echo "- Wrapper for ks-avi to create graphical interfaces" echo "- Wrapper for ks-avi to create graphical interfaces"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " * TRACKS/CONFIG DETECT:" echo " * TRACKS/CONFIG DETECT:"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-mp4-wrapper (ks-tools) - Wrapper for ks-mp4 # # ks-mp4-wrapper (ks-tools) - Wrapper for ks-mp4 #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Conversion parameters # Conversion parameters
ks_mp4_to_wrap="/usr/bin/ks-mp4" ks_mp4_to_wrap="/usr/bin/ks-mp4"
@ -45,7 +45,7 @@ else
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -65,7 +65,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -89,7 +89,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -99,7 +99,7 @@ function showFileWithSpace() {
} }
# Show info tracks of input video video file. # Show info tracks of input video video file.
# Sintax: showInfo <video_file> # Syntax: showInfo <video_file>
function showInfo() { function showInfo() {
echo "" echo ""
echo "* Information of ${1}:" echo "* Information of ${1}:"
@ -117,7 +117,7 @@ function showInfo() {
} }
# Show the video track default # Show the video track default
# Sintax: showVideoDefault <video_file> # Syntax: showVideoDefault <video_file>
function showVideoDefault() { function showVideoDefault() {
# Check de video track by default # 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) 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 # Show the audio track default
# Sintax: showAudioDefault <video_file> # Syntax: showAudioDefault <video_file>
function showAudioDefault() { function showAudioDefault() {
# Check the audio track by default # 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) 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 # Show the subtitle track default
# Sintax: showSubtitleDefault <video_file> # Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() { function showSubtitleDefault() {
# Check the subtitle track by default # 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) 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 # Show default resolution
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showResolutionDefault() { function showResolutionDefault() {
echo "${rel_size}" echo "${rel_size}"
} }
# Show default year (METADATA) # Show default year (METADATA)
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showYearDefault() { function showYearDefault() {
current_date=$(date +%Y) current_date=$(date +%Y)
echo "${current_date}" echo "${current_date}"
} }
# Show the name title default (MEDATA) # Show the name title default (MEDATA)
# Sintax: showNameDefault <video_file> # Syntax: showNameDefault <video_file>
function showNameDefault() { function showNameDefault() {
# Prepare name title by default # Prepare name title by default
FullPath="${1}" FullPath="${1}"
@ -225,7 +225,7 @@ function showNameDefault() {
} }
# Show the genre default (MEDATA) # Show the genre default (MEDATA)
# Sintax: showGenreDefault # Syntax: showGenreDefault
function showGenreDefault() { function showGenreDefault() {
echo "Unknown" echo "Unknown"
} }
@ -237,7 +237,7 @@ function showHelp() {
echo "" echo ""
echo "- Wrapper for ks-mp4 to create graphical interfaces" echo "- Wrapper for ks-mp4 to create graphical interfaces"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " * TRACKS/CONFIG DETECT:" echo " * TRACKS/CONFIG DETECT:"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-mp4k-wrapper (ks-tools) - Wrapper for ks-mp4k # # ks-mp4k-wrapper (ks-tools) - Wrapper for ks-mp4k #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Conversion parameters # Conversion parameters
ks_mp4_to_wrap="/usr/bin/ks-mp4k" ks_mp4_to_wrap="/usr/bin/ks-mp4k"
@ -45,7 +45,7 @@ else
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -65,7 +65,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -89,7 +89,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -99,7 +99,7 @@ function showFileWithSpace() {
} }
# Show info tracks of input video video file. # Show info tracks of input video video file.
# Sintax: showInfo <video_file> # Syntax: showInfo <video_file>
function showInfo() { function showInfo() {
echo "" echo ""
echo "* Information of ${1}:" echo "* Information of ${1}:"
@ -117,7 +117,7 @@ function showInfo() {
} }
# Show the video track default # Show the video track default
# Sintax: showVideoDefault <video_file> # Syntax: showVideoDefault <video_file>
function showVideoDefault() { function showVideoDefault() {
# Check de video track by default # 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) 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 # Show the audio track default
# Sintax: showAudioDefault <video_file> # Syntax: showAudioDefault <video_file>
function showAudioDefault() { function showAudioDefault() {
# Check the audio track by default # 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) 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 # Show the subtitle track default
# Sintax: showSubtitleDefault <video_file> # Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() { function showSubtitleDefault() {
# Check the subtitle track by default # 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) 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 # Show default resolution
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showResolutionDefault() { function showResolutionDefault() {
echo "${rel_size}" echo "${rel_size}"
} }
# Show default year (METADATA) # Show default year (METADATA)
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showYearDefault() { function showYearDefault() {
current_date=$(date +%Y) current_date=$(date +%Y)
echo "${current_date}" echo "${current_date}"
} }
# Show the name title default (MEDATA) # Show the name title default (MEDATA)
# Sintax: showNameDefault <video_file> # Syntax: showNameDefault <video_file>
function showNameDefault() { function showNameDefault() {
# Prepare name title by default # Prepare name title by default
FullPath="${1}" FullPath="${1}"
@ -225,7 +225,7 @@ function showNameDefault() {
} }
# Show the genre default (MEDATA) # Show the genre default (MEDATA)
# Sintax: showGenreDefault # Syntax: showGenreDefault
function showGenreDefault() { function showGenreDefault() {
echo "Unknown" echo "Unknown"
} }
@ -237,7 +237,7 @@ function showHelp() {
echo "" echo ""
echo "- Wrapper for ks-mp4k to create graphical interfaces" echo "- Wrapper for ks-mp4k to create graphical interfaces"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " * TRACKS/CONFIG DETECT:" echo " * TRACKS/CONFIG DETECT:"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-mp4s-wrapper (ks-tools) - Wrapper for ks-mp4s # # ks-mp4s-wrapper (ks-tools) - Wrapper for ks-mp4s #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Conversion parameters # Conversion parameters
ks_mp4_to_wrap="/usr/bin/ks-mp4s" ks_mp4_to_wrap="/usr/bin/ks-mp4s"
@ -45,7 +45,7 @@ else
fi fi
# Funcion to show the name of file/folder from full path # Funcion to show the name of file/folder from full path
# Sintax: extractFolderOrFile <full/path/file.txt> # Syntax: extractFolderOrFile <full/path/file.txt>
function extractFolderOrFile() { function extractFolderOrFile() {
pathToExtract="${1}/" pathToExtract="${1}/"
findFolder=0 findFolder=0
@ -65,7 +65,7 @@ function extractFolderOrFile() {
} }
# Function to remove extension from file # Function to remove extension from file
# Sintax: removeExtension "<text>" # Syntax: removeExtension "<text>"
function removeExtension() { function removeExtension() {
wordToConvert=${1} wordToConvert=${1}
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt" ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
@ -89,7 +89,7 @@ function removeExtension() {
} }
# Function to show files with spaces. # Function to show files with spaces.
# Sintax: showFileWithSpace <file number> # Syntax: showFileWithSpace <file number>
function showFileWithSpace() { function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp sed -i 's/_/ /g' ${dirTemp}/name.tmp
@ -99,7 +99,7 @@ function showFileWithSpace() {
} }
# Show info tracks of input video video file. # Show info tracks of input video video file.
# Sintax: showInfo <video_file> # Syntax: showInfo <video_file>
function showInfo() { function showInfo() {
echo "" echo ""
echo "* Information of ${1}:" echo "* Information of ${1}:"
@ -117,7 +117,7 @@ function showInfo() {
} }
# Show the video track default # Show the video track default
# Sintax: showVideoDefault <video_file> # Syntax: showVideoDefault <video_file>
function showVideoDefault() { function showVideoDefault() {
# Check de video track by default # 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) 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 # Show the audio track default
# Sintax: showAudioDefault <video_file> # Syntax: showAudioDefault <video_file>
function showAudioDefault() { function showAudioDefault() {
# Check the audio track by default # 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) 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 # Show the subtitle track default
# Sintax: showSubtitleDefault <video_file> # Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() { function showSubtitleDefault() {
# Check the subtitle track by default # 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) 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 # Show default resolution
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showResolutionDefault() { function showResolutionDefault() {
echo "${rel_size}" echo "${rel_size}"
} }
# Show default year (METADATA) # Show default year (METADATA)
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showYearDefault() { function showYearDefault() {
current_date=$(date +%Y) current_date=$(date +%Y)
echo "${current_date}" echo "${current_date}"
} }
# Show the name title default (MEDATA) # Show the name title default (MEDATA)
# Sintax: showNameDefault <video_file> # Syntax: showNameDefault <video_file>
function showNameDefault() { function showNameDefault() {
# Prepare name title by default # Prepare name title by default
FullPath="${1}" FullPath="${1}"
@ -225,7 +225,7 @@ function showNameDefault() {
} }
# Show the genre default (MEDATA) # Show the genre default (MEDATA)
# Sintax: showGenreDefault # Syntax: showGenreDefault
function showGenreDefault() { function showGenreDefault() {
echo "Unknown" echo "Unknown"
} }
@ -237,7 +237,7 @@ function showHelp() {
echo "" echo ""
echo "- Wrapper for ks-mp4s to create graphical interfaces" echo "- Wrapper for ks-mp4s to create graphical interfaces"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " * TRACKS/CONFIG DETECT:" echo " * TRACKS/CONFIG DETECT:"
echo "" echo ""

View File

@ -2,12 +2,12 @@
############################################################### ###############################################################
# ks-vob-wrapper (ks-tools) - Wrapper for ks-vob # # ks-vob-wrapper (ks-tools) - Wrapper for ks-vob #
# Date: 10-03-2021 # # Date: 22-03-2021 #
# Author: q3aql # # Author: q3aql #
# Contact: q3aql@protonmail.ch # # Contact: q3aql@protonmail.ch #
############################################################### ###############################################################
VERSION="6.7" VERSION="6.8"
M_DATE="100321" M_DATE="220321"
# Conversion parameters # Conversion parameters
ks_mp4_to_wrap="/usr/bin/ks-vob" ks_mp4_to_wrap="/usr/bin/ks-vob"
@ -40,7 +40,7 @@ else
fi fi
# Show info tracks of input video video file. # Show info tracks of input video video file.
# Sintax: showInfo <video_file> # Syntax: showInfo <video_file>
function showInfo() { function showInfo() {
echo "" echo ""
echo "* Information of ${1}:" echo "* Information of ${1}:"
@ -55,7 +55,7 @@ function showInfo() {
} }
# Show the video track default # Show the video track default
# Sintax: showVideoDefault <video_file> # Syntax: showVideoDefault <video_file>
function showVideoDefault() { function showVideoDefault() {
# Check de video track by default # 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) 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 # Show the audio track default
# Sintax: showAudioDefault <video_file> # Syntax: showAudioDefault <video_file>
function showAudioDefault() { function showAudioDefault() {
# Check the audio track by default # 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) 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 # Show default resolution
# Sintax: showResolutionDefault # Syntax: showResolutionDefault
function showResolutionDefault() { function showResolutionDefault() {
echo "${rel_size}" echo "${rel_size}"
} }
@ -113,7 +113,7 @@ function showHelp() {
echo "" echo ""
echo "- Wrapper for ks-vob to create graphical interfaces" echo "- Wrapper for ks-vob to create graphical interfaces"
echo "" echo ""
echo "+ Sintax:" echo "+ Syntax:"
echo "" echo ""
echo " * TRACKS/CONFIG DETECT:" echo " * TRACKS/CONFIG DETECT:"
echo "" echo ""