From 50facb86f380ababaa641a7ee815a037f62b6937 Mon Sep 17 00:00:00 2001 From: Ken Fallon Date: Mon, 20 Oct 2025 15:36:48 +0200 Subject: [PATCH] dat update and minor format changes --- Community_News/recording_dates.dat | 1 + workflow/process_episode.bash | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Community_News/recording_dates.dat b/Community_News/recording_dates.dat index 892feab..3b0ea33 100644 --- a/Community_News/recording_dates.dat +++ b/Community_News/recording_dates.dat @@ -36,3 +36,4 @@ 2025-06-01,2025-07-04 15:00:00 2025-07-01,2025-08-01 15:00:00 2025-08-01,2025-08-29 15:00:00 +2025-09-01,2025-09-26 15:00:00 diff --git a/workflow/process_episode.bash b/workflow/process_episode.bash index 1763420..a89c448 100755 --- a/workflow/process_episode.bash +++ b/workflow/process_episode.bash @@ -48,13 +48,6 @@ function echo_debug() { fi } -################################################# -# Display Information message - -function abs_diff() { - echo $(($1 >= $2 ? $1 - $2 : $2 - $1)) -} - ################################################# # Display Help @@ -63,6 +56,13 @@ function display_help_and_exit() { exit 1 } +################################################# +# Calculate difference + +function abs_diff() { + echo $(($1 >= $2 ? $1 - $2 : $2 - $1)) +} + ################################################# # Program Checks @@ -174,7 +174,7 @@ function check_variable_is_correct() { fi if [ "$( file --brief --mime-type "${assets_csv}" | grep --count 'text/csv' )" -ne "1" ] then - echo_error "The \"assets_csv\" variable has not a valid \"text/csv\" mime type." + echo_error "The \"assets_csv\" file has not a valid \"text/csv\" mime type." fi if [ "$( wc --lines ${assets_csv} | awk '{print $1}' )" -le "1" ] then @@ -1657,7 +1657,7 @@ function generate_show_transcript() { cat "${episode_srt}" | while read this_line do - if [ "$( echo "${this_line}" | grep -c --perl-regexp '^[0-9]+$' )" -eq "1" ] + if [ "$( echo "${this_line}" | grep --count --perl-regexp '^[0-9]+$' )" -eq "1" ] then echo "${count}" count=$((count+1))