This commit is contained in:
KenwoodFox
2025-10-14 17:44:51 -04:00
parent 9c819d6325
commit f46000649c
7 changed files with 104 additions and 40 deletions

23
.zshrc
View File

@@ -144,3 +144,26 @@ export FZF_DEFAULT_OPTS="--layout=reverse --inline-info --height=80%"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# This is fo cumtanks lol
cumtanks() {
cd /home/joe/git/Snowsune/cumtanks || return 1
EPOCH=$(date +%s)
DATA_JSON="www/data.json"
tmpfile=$(mktemp)
awk -v epoch="$EPOCH" '
BEGIN { added=0 }
/"logs"[ \t]*:[ \t]*\[/ { inlogs=1 }
inlogs && /\]/ && !added {
sub(/\]/, " ,{ \"date\": " epoch ", \"text\": \"\" }\n ]")
added=1
}
{ print }
' "$DATA_JSON" > "$tmpfile" && mv "$tmpfile" "$DATA_JSON"
sed -i 's/,\n ]/\n ]/' "$DATA_JSON"
code -g "$DATA_JSON":$(grep -n '"logs"' "$DATA_JSON" | cut -d: -f1)
}
# For chat GPT
export OPENAI_API_KEY="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"