Reedit partial shownotes. Fix for changed duration. IA publish date in future workaround
This commit is contained in:
@@ -844,8 +844,12 @@ function extract_images_brute_force() {
|
||||
|
||||
if [ -s "${shownotes_edited}" ]
|
||||
then
|
||||
echo_debug "There is already an edited version of the shownotes at \"${shownotes_edited}\", slipping image extraction."
|
||||
return
|
||||
if [ "$( grep -c '<!DOCTYPE HTML>' "${shownotes_edited}" )" -eq "0" ]
|
||||
then
|
||||
echo_debug "There is already an edited version of the shownotes at \"${shownotes_edited}\", slipping image extraction."
|
||||
return
|
||||
fi
|
||||
echo_debug "There is an unfinished edited version of the shownotes at \"${shownotes_edited}\", extracting images."
|
||||
fi
|
||||
|
||||
if [[ -z "${shownotes_html}" || ! -s "${shownotes_html}" ]]
|
||||
@@ -1240,11 +1244,17 @@ function manual_shownotes_review() {
|
||||
|
||||
if [ -s "${shownotes_edited}" ]
|
||||
then
|
||||
echo_debug "There is already an edited version of the shownotes at \"${shownotes_edited}\"."
|
||||
return
|
||||
if [ "$( grep -c '<!DOCTYPE HTML>' "${shownotes_edited}" )" -eq "0" ]
|
||||
then
|
||||
echo_debug "There is already an edited version of the shownotes at \"${shownotes_edited}\", skipping manual_shownotes_review."
|
||||
return
|
||||
fi
|
||||
echo_debug "There is an unfinished edited version of the shownotes at \"${shownotes_edited}\", leaving it intact."
|
||||
else
|
||||
echo_debug "Extracting the shownotes to \"${shownotes_edited}\"."
|
||||
cp -v "${shownotes_html}" "${shownotes_edited}"
|
||||
fi
|
||||
|
||||
cp -v "${shownotes_html}" "${shownotes_edited}"
|
||||
|
||||
if [ ! -s "${shownotes_edited}" ]
|
||||
then
|
||||
@@ -1563,7 +1573,7 @@ function generate_derived_media() {
|
||||
then
|
||||
echo_debug "The file \"hpr${ep_num}.${extension}\" duration of ${this_duration} is close enough to ${expected_duration}"
|
||||
else
|
||||
echo_error "The file \"hpr${ep_num}.${extension}\" actual duration of ${this_duration} is not close enough to posted duration of ${expected_duration}. Fix or update the posted duration to ${source_duration}."
|
||||
echo_error "The file \"hpr${ep_num}.${extension}\" actual duration of ${this_duration} is not close enough to posted duration of ${expected_duration}. Fix or update the posted duration to ${source_duration}. Try using \"sed -i 's/\"${duration}\"/\"${source_duration}\"/g' ${episode_summary_json}\""
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -2209,6 +2219,9 @@ function create_item_on_the_internet_archive() {
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo_debug "The episode has not been posted to the Internet Archive"
|
||||
## bug IA date as spam
|
||||
date="$( date -u +%Y-%m-%d )"
|
||||
|
||||
ia upload hpr${ep_num} "${working_dir}/hpr${ep_num}.txt" --metadata=mediatype:audio --metadata="contributor:HackerPublicRadio" --metadata="creator:${artist}" --metadata="date:${date}" --metadata="description:${synopsis}." --metadata="language:eng" --metadata="licenseurl:${license_url}" --metadata="title:${title}." --metadata=reviews-allowed:none --header x-archive-keep-old-version:0 --retries=5 --no-derive --no-backup
|
||||
else
|
||||
echo_debug "The episode has been posted to the Internet Archive"
|
||||
|
||||
Reference in New Issue
Block a user