From ccd27ade60c422a512f642bc479c600851548531 Mon Sep 17 00:00:00 2001 From: Steven Presti Date: Mon, 22 Jan 2024 16:27:53 -0500 Subject: [PATCH] meeting-template: update fcosmeetinghtml The latest version of the fcos meetbot does not include links in the html summary. To keep this feature lets use timestamps as IDs and hydrate them with links pointing to the log.html. --- static/meeting-template.md | 44 ++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/static/meeting-template.md b/static/meeting-template.md index 52fc2bc..839a658 100644 --- a/static/meeting-template.md +++ b/static/meeting-template.md @@ -120,24 +120,40 @@ At least 5 people must vote, or 51% of the WG membership, whichever is less. Vot - [ ] category: `Project Discussion` - [ ] tags: `coreos-wg` - [ ] In the terminal Copy and paste the following - ```bash fcosmeetinghtml() { - local url=$1 - # we'll substitute in using the non-raw url for nice highlighting of line numbers - local baseurl=$(dirname $url) - if [[ ! $url =~ raw ]]; then - url=$(echo "$url" | sed "s|meetbot.fedoraproject.org|meetbot-raw.fedoraproject.org|") - fi - # Take the html and delete the contents (doesn't render correctly) - # and also substitute in the base url to make relative URLs absolute. - curl --silent $url | \ - sed -z 's|.*||' | \ - sed "s|href='fedora|href='${baseurl}/fedora|" | \ - sed "s|href=\"fedora|href=\"${baseurl}/fedora|" + SUMMARY_URL="$1" + + # Extract meeting date and time from the summary URL + MEETING_DATE_TIME=$(echo "$SUMMARY_URL" | grep -Eo '[0-9]{4}-[0-9]{2}-[0-9]{2}-[0-9]{2}\.[0-9]{2}') + + # Extract meeting date from the date and time + MEETING_DATE=$(echo "$MEETING_DATE_TIME" | cut -d'-' -f1-3) + + # Generate the log URL based on the meeting date and time + LOG_URL="https://meetbot-raw.fedoraproject.org/meeting-1_matrix_fedoraproject-org/$MEETING_DATE/fedora-coreos-meeting.$MEETING_DATE_TIME.log.html" + + # Extract line numbers and timestamps from the log file + timestamps_and_lines=$(curl -s "$LOG_URL" | grep -Eo '
|
[0-9]{2}:[0-9]{2}:[0-9]{2}
') + + # Generate sed commands to replace timestamps with hyperlinks including line numbers + sed_commands="" + current_line="" + while read -r line; do + if [[ "$line" =~ '