A ChatGPT based emulation of the therapist Doctor Kernel from the book "A digital Affair" by Neora Shem Shaul
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

run.sh 507B

123456789101112131415
  1. #!/bin/sh
  2. . ./.env
  3. . venv/bin/activate
  4. while [ 1 ] ; do
  5. LOGFILE=log-$(date +%Y%m%d-%H%M%S).txt
  6. python doctor.py|tee logs/$LOGFILE
  7. # Only 3rd '>' counts. We should also skip '<Enter>' in the header ;)
  8. if [ $(grep -c '>' logs/$LOGFILE) -lt 3 ] ; then
  9. rm logs/$LOGFILE
  10. dialog --title "Session aborted" --msgbox "Hit <Enter> to continue..." 5 60
  11. else
  12. python genlogs.py
  13. dialog --title "Session saved" --msgbox "Session saved to file $LOGFILE" 5 60
  14. fi
  15. done