Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix out permissions and add .orig files to emojis. - annna - Annna the nice fri…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit b4d9aac041539ed71417a2e31d20dd13e17a5180
parent b68e6a303205a0c529a2a950ecdc7ef12163866f
Author: Annna Robert-Houdin <[email protected]>
Date: Wed, 27 Dec 2023 11:04:15 +0100
Fix out permissions and add .orig files to emojis.
Diffstat:
M annna-start-service | 5 +----
M stable-diffusion-emoji | 7 +++++--
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/annna-start-service b/annna-start-service
@@ -1,7 +1,4 @@
#!/bin/sh
-#
-# Here follow scriplets to listen for commands in annna.
-#
if [ $# -lt 2 ];
then
@@ -28,7 +25,7 @@ serverbase="${ircbase}/${server}"
[ -p "${serverbase}/${channel}/in" ] \
&& chmod o+w "${serverbase}/${channel}/in"
# For annna-cmd.
-[ -p "${serverbase}/${channel}/out" ] \
+[ -f "${serverbase}/${channel}/out" ] \
&& chmod o+w "${serverbase}/${channel}/out"
if [ -f "${serverbase}/${channel}/out" ];
diff --git a/stable-diffusion-emoji b/stable-diffusion-emoji
@@ -15,9 +15,11 @@ emojiuribase="gophers://bitreich.org/I/emoji"
emojistr="$@"
emojiprompt="$(printf "%s\n" "${emojistr}" \
| sed 's,^::,,; s,::$,,; s|[-,:=/\.]| |g')"
-emojifile="$(printf "%s\n" "${emojiprompt}" \
+emojifilebase="$(printf "%s\n" "${emojiprompt}" \
| cut -c -64 \
- | sed 's, ,-,g').png"
+ | sed 's, ,-,g')"
+emojifile="${emojifilebase}.png"
+emojiorig="${emojifilebase}.orig"
[ -z "${emojiprompt}" ] && exit 1
@@ -25,6 +27,7 @@ if [ ! -e "${emojidb}/${emojifile}" ];
then
SD_MODEL="/br/ai/stable-diffusion.cpp/models/epicphotogasm_x-ggml-mode…
stable-diffusion "${emojidb}/${emojifile}" "${emojiprompt}"
+ printf "%s\n" "${emojiprompt}" >> "${emojidb}/${emojiorig}"
fi
[ $? -eq 0 ] && printf "%s/%s\n" "${emojiuribase}" "${emojifile}"
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.