Skip to content

Commit

Permalink
Don't deal with chyrons or captions for committee video
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
waldoj committed Jan 26, 2018
1 parent 974265c commit 40ba334
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions bin/handler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/}"
Expand All @@ -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" '
Expand Down

0 comments on commit 40ba334

Please sign in to comment.