forked from HPR/hpr_hub
Add option to show the state of the reserve queue
This commit is contained in:
parent
52579ede17
commit
a170cbf197
@ -4,6 +4,8 @@
|
||||
|
||||
upload_dir="/home/hpr/upload"
|
||||
reserve_dir="/home/hpr/reserve"
|
||||
hub_dir="/home/hpr/hub"
|
||||
reserve_file="${hub_dir}/reserve.txt"
|
||||
|
||||
while read reserve_show_dir
|
||||
do
|
||||
@ -20,21 +22,13 @@ do
|
||||
Timestamp="$( jq --raw-output '.metadata.Timestamp' "${shownotes}" )"
|
||||
Title="$( jq --raw-output '.episode.Title' "${shownotes}" | sed -e 's/[^A-Za-z0-9]/_/g' -e 's/__/_/g')"
|
||||
Timestamp_Epoch="$( \date -u +%s -d "${Timestamp}" )"
|
||||
#hostid="$( jq --raw-output '.host.Host_ID + "_" + .metadata.Key + "_" + .episode.Title' "${shownotes}" )"
|
||||
mv -v "${reserve_show_dir}" "${reserve_dir}/${Timestamp_Epoch}_${Host_ID}_${Key}_${Host_Name}_${Title}"
|
||||
done < <( find "${upload_dir}" -type d -iname "*_9999_*" )
|
||||
|
||||
#ls -al "${reserve_dir}"
|
||||
|
||||
# drwxr-xr-x. 1 ken ken 136 Jul 2 19:33 1688318808_198_321136810af5473fb011ae91d0e8b49264a1b35871d65_Ahuka_Audacity-Update
|
||||
# drwxr-xr-x. 1 ken ken 148 Jul 2 19:42 1688319300_198_562721ff5261ef02277be37ade18bae364a1b544c445e_Ahuka_Creative_Commons_Search_Engine
|
||||
# drwxr-xr-x. 1 ken ken 84 Jul 3 22:54 1688416961_391_aaf8e86be56a78cfd60e611af93d9d2e64a332c1b9572_Sgoti_confuses_everyone_with_bash_nonsense
|
||||
# drwxr-xr-x. 1 ken ken 84 Jul 5 20:58 1688583277_391_b04748b6e57e5f72c7853be33889f3ce64a5bc6dca8e5_Sgoti_talks_about_driving_in_the_state_of_Virginia
|
||||
# drwxr-xr-x. 1 ken ken 84 Jul 6 00:34 1688595802_391_6dffbcaf766aedaffed2a61b6a648f3c64a5ed5ac6341_Sgoti_rambles_about_a_video_game_called_GrimDawn
|
||||
# drwxr-xr-x. 1 ken ken 84 Jul 9 20:25 1688926358_391_1c3ffa201045c40311b536ee4ef4a62864aaf8961d692_Sgoti_My_road_recording_setup
|
||||
# drwxr-xr-x. 1 ken ken 84 Sep 8 07:30 1694150656_391_8504d8543e1cc8760b76fff27c5d1f4b64fab00057c8e_Some_Guy_On_The_Internet_Sextortion_Good_Heavens
|
||||
|
||||
# drwxr-xr-x. 1 ken ken 98 Oct 24 16:22 1698156039_9999_1970-01-01_6c585b3db2bfb5fc70216620ac97c0d56537ce07155a4
|
||||
# drwxr-xr-x. 1 ken ken 110 Oct 24 16:25 1698157365_9999_1970-01-01_f8d61b32850177939428764c53dfb2006537d3353a95e
|
||||
# drwxr-xr-x. 1 ken ken 92 Oct 24 16:26 1698157513_9999_1970-01-01_a85b7a7febda983fdeb8ba1c165736146537d3c93d27d
|
||||
# drwxr-xr-x. 1 ken ken 96 Oct 24 16:28 1698157609_9999_1970-01-01_a85414f9074042bf14db0e56f62cc25d6537d4293c86e
|
||||
ls -1 "${reserve_dir}" | awk -F '_' '{ $2=""; $3=""; print}' | while read line
|
||||
do
|
||||
upload_epoch="$( echo "${line}" | awk '{print $1}' )"
|
||||
upload_iso8601="$( \date -d "@${upload_epoch}" +%Y-%m-%d )"
|
||||
echo "${upload_iso8601} $( echo ${line} | awk '{ $1=""; print}' )"
|
||||
done > "${reserve_file}"
|
||||
cat "${reserve_file}"
|
||||
|
@ -315,7 +315,7 @@ for ( $slot = $current_episode_number; $slot < ( $current_episode_number + 60 );
|
||||
}
|
||||
?>
|
||||
|
||||
<h3>Also Scheduled</h3>
|
||||
<h3 id="also_scheduled">Also Scheduled</h3>
|
||||
<?php
|
||||
$slot--;
|
||||
while ( $slot <= $max_episode_number) {
|
||||
@ -334,8 +334,14 @@ while ( $slot <= $max_episode_number) {
|
||||
}
|
||||
?>
|
||||
|
||||
<h3 id="reserve_queue_overview">Reserve Queue Overview</h3>
|
||||
<pre>
|
||||
<?php
|
||||
include 'reserve.txt';
|
||||
?>
|
||||
</pre>
|
||||
|
||||
<h3>Pick other dates</h3>
|
||||
<h3 id="pick_other_dates">Pick other dates</h3>
|
||||
<p>
|
||||
If you wish to pick an available slot in the next 12 months then go directly to the <a aria-label="Go to the request page" href="<?php echo "${hubBaseurl}"; ?>request.php">request page</a>.
|
||||
</p>
|
||||
|
Loading…
Reference in New Issue
Block a user