From 40ba3344911e2fcaad60d107747134d0df5d217e Mon Sep 17 00:00:00 2001 From: Waldo Jaquith Date: Thu, 25 Jan 2018 23:49:04 -0500 Subject: [PATCH] Don't deal with chyrons or captions for committee video MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This isn’t what we want to do ultimately. We’ll want to get both captions and chyrons for both. But, right now, we don’t have support for those. Toward #59 and #33. --- bin/handler.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/bin/handler.sh b/bin/handler.sh index 0e53202..17f6eaf 100755 --- a/bin/handler.sh +++ b/bin/handler.sh @@ -47,6 +47,7 @@ set $date set $date_hyphens set $s3_url set $chamber +set $type # Define the name of the directory that will store the extracted chyrons. export output_dir="${filename/.mp4/}" @@ -69,17 +70,22 @@ fi cd .. export VIDEO_ID="$(php ../bin/save_metadata.php "$filename" "$output_dir")" || exit $? -# Insert the chyrons into the database. -php ../bin/save_chyrons.php "$VIDEO_ID" "$output_dir" || exit $? +# Only deal with chyrons and captions for floor video. +if [ "$type" = "floor" ]; then -# Resolve the chyrons to individual legislators and bills. -php ../bin/resolve_chyrons.php "$VIDEO_ID" || exit $? + # Insert the chyrons into the database. + php ../bin/save_chyrons.php "$VIDEO_ID" "$output_dir" || exit $? -# Retrieve the captions. -CAPTIONS_FILE="$(php ../bin/get_captions.php "$chamber" "$date_hyphens")" || exit $? + # Resolve the chyrons to individual legislators and bills. + php ../bin/resolve_chyrons.php "$VIDEO_ID" || exit $? -# Process the captions. -php ../bin/process_captions.php "$CAPTIONS_FILE" "$VIDEO_ID" || exit $? + # Retrieve the captions. + CAPTIONS_FILE="$(php ../bin/get_captions.php "$chamber" "$date_hyphens")" || exit $? + + # Process the captions. + php ../bin/process_captions.php "$CAPTIONS_FILE" "$VIDEO_ID" || exit $? + +fi #/home/ubuntu/youtube-upload-master/bin/youtube-upload ' # . '--tags="virginia, legislature, general assembly" '