feat: More presentation slides.

This commit is contained in:
2024-12-30 17:06:51 -05:00
parent 39a6b5e283
commit c6ba2158a5
13 changed files with 228 additions and 10 deletions

16
bin/run
View File

@@ -10,7 +10,10 @@ zparseopts -D -E -- \
-show-history=showhistory \
-show-me-the-chillers=showchillers \
-ask-chat-gpt:=askgpt \
-output:=outputFile
-output:=outputFile \
-show-hvac-characteristics=showhvac \
-copy-gpt-output:=copygpt \
-show-the-diff-yo=showdiff
######################### Helpers #########################
@@ -24,6 +27,11 @@ function spinner {
gum spin --title "$1" -- sleep "${2:-5}"
}
function getGptOutput {
local json=$1
echo "$(cat "files/$json" | jq '.["choices"][0]["message"]["content"]')"
}
function parseGpt {
local json=$1
local header=$2
@@ -69,4 +77,10 @@ elif [ ! -z "$askgpt" ]; then
local file="${outputFile[-1]}"
spinner "Asking ChatGPT..."
askChatGpt $question $file
elif [ ! -z "$showhvac" ]; then
echo "$(parseGpt 'hvac.json' '# HVAC Components')" | gum format | gum pager
elif [ ! -z "$copygpt" ]; then
echo "$(getGptOutput ${copygpt[-1]})" | pbcopy
elif [ ! -z "$showdiff" ]; then
echo "$(parseGpt 'diff.json' '# Key Differences')" | gum format | gum pager
fi