From 09fa762e43f866c335b32bc6904903b33d27cb6b Mon Sep 17 00:00:00 2001 From: Ken Fallon Date: Fri, 27 Dec 2024 11:23:32 +0100 Subject: [PATCH] Documenting upload and host table --- workflow/directory-structure.md | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/workflow/directory-structure.md b/workflow/directory-structure.md index 609b3a7..f34ca48 100644 --- a/workflow/directory-structure.md +++ b/workflow/directory-structure.md @@ -42,6 +42,65 @@ It renames the directory structure based on a combination of fields separated by ``` Reserve shows are downloaded and submitted by the Janitors on behalf of the host. This follows the normal posting process where the host and Janitors are cc'd on the notification emails. The only difference is that the audio is edited to include a notification that the show is from the reserve queue, and that it is the Janitors that upload the show via the supplied link. +## Show Processing + +### Adding the host to the `hosts` table + +This is currently added manually by the Janitors, as the text to speech tools often requires manipulation to get it sounding correct. + + + + + + + + + + + + +The hosts email address with the `@` replaced with `.nospam@nospam.` as an antispam measure + + + + + + + +
FieldDescriptionExample
hostidAutomatically generated incrementing number.987
hostThe name or handle of the host.Emperor Ming
emailEmperor.Ming.nospam@nospam.example.com
profileA html host profile`

Follow me Mastodon: @Emperor.Ming@mastodon.example.org

`
licenseOne of the allowed licenses`CC-BY-SA`
local_imageIf a avatar is available directly from the host.`1`
gpgWe can verify the hosts emails, with [thought to automatically verify](https://repo.anhonesthost.net/HPR/hpr-tools/issues/4).`1C7398B00F0239E8`
validAllows temporary de-listing of host`0`
espeak_nameThe text to speech version of the name or handle.Fifty One Fifty
+ +Host Images/Avatars, can either be: + +Local Images uploaded when the host submits or edits their profile. +Gravatar Images downloaded periodically by the Janitors and copied to the file store on the [origin server](https://en.wikipedia.org/wiki/Upstream_server). +Default Images added by [hpr_generator](https://repo.anhonesthost.net/HPR/hpr_generator/src/branch/main/public_html/images/hosts) when the host has no other image. + +All the images are [currently](https://repo.anhonesthost.net/HPR/hpr_generator/issues/234) stored in the [hpr_generator](https://repo.anhonesthost.net/HPR/hpr_generator/src/branch/main/public_html/images/hosts) repository, and get transferred to the server using [hpr-publish.bash](https://repo.anhonesthost.net/HPR/hpr-tools/src/branch/main/workflow/hpr-publish.bash). + +### Adding the episode to the `eps` table + +The script [postshow.bash](https://repo.anhonesthost.net/HPR/hpr-tools/src/branch/main/workflow/postshow.bash) is run locally on the Janitors computer. +It calls the HPR CMS script [status.php](https://repo.anhonesthost.net/HPR/hpr_hub/src/branch/main/cms/status.php) to return a tab separated list of the shows in the queue. + +``` +timestamp_epoc ep_num ep_date key status email +2339594445 9278 2044-02-24 aeb0579fcac318005d7550a60fd60403676c24d94148b SHOW_SUBMITTED joe.blogg.nospam@nospam.example.com +2339680845 9999 1970-01-01 4bd713699e5bc0978d5fef85a60f09bc7f70ef3488624 RESERVE_SHOW_SUBMITTED Emperor.Ming.nospam@nospam.example.com +``` +It selects the first show with a status of `SHOW_SUBMITTED` and uses `rsync` to clone the directory locally. It then parses the `shownotes.json` file and extracts the shownotes object to a new file `shownotes.html`. + +All embedded images are saved as local image files, with the format `hpr${ep_num}_${image_count}` based on "episode number", a underscore as delimiter, and then a sequential number of the image in the notes. eg `hpr9876_1.jpg`. + +Where they are images larger than 400 pixels wide, a thumbnail is created with the same image name but suffixed with `_tn`. eg `hpr9876_1_tn.jpg`. + +The Janitors then review the shownotes for issues. + +The duration will be extracted from the media, and the other metadata from the `shownotes.json` file. After some checks it will be [URL encoded](https://en.wikipedia.org/wiki/Percent-encoding). + +The script allows overwriting of any value in the json file from the command line, and also prevents posting from a new host that has not yet been assigned a entry in the `hosts` table. + +Once all the checks are done the + ## Output Directory Structure It should be possible to ship the entire backlog on physical media to someone, and have them plug it in and for any media player be able to play it. Each episode has it's own "album" which corresponds to a directory. The directory structure is kept as flat as possible with everything related to show eg: 9876 in a single directory `hpr9876`. This is the least common denominator, and in no way precludes web services, or other applications.