Added CC-0 to header

This commit is contained in:
Ken Fallon 2024-12-27 10:41:13 +01:00
parent e4aab4d7c2
commit aae14715f5
7 changed files with 59 additions and 10 deletions

View File

@ -1,4 +1,6 @@
#!/bin/bash - #!/usr/bin/env bash
# Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/
#============================================================
# #
# Copied from a 'history' file on archive.org and turned into a script # Copied from a 'history' file on archive.org and turned into a script

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/usr/bin/env bash
# Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/
# CC-0 Ken Fallon #============================================================
assets_db="assets_202410181601.csv" assets_db="assets_202410181601.csv"
total="$( wc -l assets_202410181601.csv | awk '{print $1}' )" total="$( wc -l assets_202410181601.csv | awk '{print $1}' )"

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/usr/bin/env bash
# Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/ # Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/
#============================================================
find ${HOME}/processing/ -type f | egrep -v '/sponsor-anhonesthost.com-hpr15.flac|/outro.flac|/intro.flac|/sponsor-archive.org.flac' | while read mediafile find ${HOME}/processing/ -type f | egrep -v '/sponsor-anhonesthost.com-hpr15.flac|/outro.flac|/intro.flac|/sponsor-archive.org.flac' | while read mediafile
do do
duration=$( mediainfo --full --Output=XML "${mediafile}" | xmlstarlet sel -T -t -m "_:MediaInfo/_:media/_:track[@type='Audio']/_:Duration[1]" -v "." -n - | awk -F '.' '{print $1}' ) duration=$( mediainfo --full --Output=XML "${mediafile}" | xmlstarlet sel -T -t -m "_:MediaInfo/_:media/_:track[@type='Audio']/_:Duration[1]" -v "." -n - | awk -F '.' '{print $1}' )

View File

@ -1,4 +1,6 @@
#!/bin/bash #!/usr/bin/env bash
# Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/
#============================================================
file_dir="/var/IA/uploads" file_dir="/var/IA/uploads"

45
workflow/hpr-publish.bash Executable file
View File

@ -0,0 +1,45 @@
#!/usr/bin/env bash
# Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/
#============================================================
git_dir="$HOME/tmp/hpr/hpr_generator/sourcecode"
if [ ! -d "${git_dir}/.git" ]
then
#git clone gitea@repo.anhonesthost.net:rho_n/hpr_generator.git "${git_dir}"
git clone gitea@repo.anhonesthost.net:HPR/hpr_generator.git "${git_dir}"
fi
cd "${git_dir}"
git pull
ssh hpr -t "ls -al /home/hpr/www/hpr.sql;md5sum /home/hpr/www/hpr.sql"
ssh hpr -t "/home/hpr/bin/hpr_db_backup.bash"
ssh hpr -t "ls -al /home/hpr/www/hpr.sql;md5sum /home/hpr/www/hpr.sql"
./utils/update-hpr-db.sh
if [ $? -ne 0 ]
then
echo 'Terminating...' >&2
exit 1
fi
./site-generator --all --verbose
if [ $? -ne 0 ]
then
echo 'Terminating...' >&2
exit 1
fi
rsync -av --partial --progress "${git_dir}/public_html/" hpr:/home/hpr/public_html/
rsync -av --partial --progress "${git_dir}/public_html/" hobbypublicradio.org:hobbypublicradio.org/
cd $HOME/sourcecode/hpr/hpr_hub/
git pull
cd $HOME/sourcecode/hpr/hpr_hub/sql
split --hex-suffixes --lines=1000 --additional-suffix=.sql hpr.sql hpr-db-part-
cd $HOME/sourcecode/hpr/hpr_hub/
git add $HOME/sourcecode/hpr/hpr_hub/sql/hpr*sql
git commit -m "$(\date -u +%Y-%m-%d_%H-%M-%SZ_%A ) database changed"
git push
#xdg-open https://hackerpublicradio.org/

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/ # Copyright Ken Fallon - Released into the public domain. http://creativecommons.org/publicdomain/
#============================================================ #============================================================
PATH=$PATH:$HOME/sourcecode/hpr/hpr_hub/bin/ PATH=$PATH:$HOME/sourcecode/hpr/hpr_hub/bin/
source $HOME/tmp/pip3.9/bin/activate source $HOME/tmp/pip3.9/bin/activate
# https://hub.tcno.co/ai/whisper/install/ # https://hub.tcno.co/ai/whisper/install/

View File

@ -255,12 +255,9 @@ fi
# Post show to HPR # Post show to HPR
# #
post_show="${processing_dir}/${dest_dir}/post_show.txt"
post_show_json="${processing_dir}/${dest_dir}/post_show.json" post_show_json="${processing_dir}/${dest_dir}/post_show.json"
post_show_response="${processing_dir}/${dest_dir}/post_show_response.txt" post_show_response="${processing_dir}/${dest_dir}/post_show_response.txt"
echo "key=${key}&ep_num=${ep_num}&ep_date=${ep_date}&email=${email}&title=${title}&duration=${duration}&summary=${summary}&series_id=${series_id}&series_name=${series_name}&explicit=${explicit}&episode_license=${episode_license}&tags=${tags}&hostid=${hostid}&host_name=${host_name}&host_license=${host_license}&host_profile=${host_profile}&notes=${notes}" > ${post_show}
echo "Sending:" echo "Sending:"
cat "${post_show}" cat "${post_show}"
echo "key=${key} echo "key=${key}