URI: 
       Remove localhost reference from gph links - postreich - Unnamed repository; edit this file 'description' to name the repository.
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit 9d738a2de5740572222a3e4ad00b4e61e43dea53
   DIR parent 47f7a956a96ee0d4cdcac5c59e223d34316d91dc
  HTML Author: Scarlett McAllister <no+reply@roygbyte.com>
       Date:   Tue, 30 Jan 2024 20:55:14 -0400
       
       Remove localhost reference from gph links
       
       Diffstat:
         M src/geomyidae/api/templates/valent… |       4 ++--
         M src/geomyidae/index.dcgi            |       4 ++--
         M src/geomyidae/sendmail.dcgi         |      10 +++++-----
       
       3 files changed, 9 insertions(+), 9 deletions(-)
       ---
   DIR diff --git a/src/geomyidae/api/templates/valentine/main b/src/geomyidae/api/templates/valentine/main
       @@ -48,11 +48,11 @@ handle=$( find_value_in_args "handle" "$path" )
        choose_sweetheart() {
            cat "$SWEETHEARTS" \
                | awk -v args="$path" \
       -              'BEGIN {FS = "\t"} { printf "[1|%s|sendmail.dcgi?%s?sweetheart=%s|localhost|70]\n", $1, args, $1 }'
       +              'BEGIN {FS = "\t"} { printf "[1|%s|sendmail.dcgi?%s?sweetheart=%s||70]\n", $1, args, $1 }'
        }
        
        write_text() {
       -    printf "[7|Write your message|sendmail.dcgi?$path|localhost|70]\n"
       +    printf "[7|Write your message|sendmail.dcgi?$path||70]\n"
        }
        
        # echo $sweetheart # debug
   DIR diff --git a/src/geomyidae/index.dcgi b/src/geomyidae/index.dcgi
       @@ -15,8 +15,8 @@
        echo 'Welcome to Postreich, a gopher powered mail service. Here you can
        setup a mailbox and receive mail over the gopher protocol.'
        echo
       -echo "[1|Send mail|$BASE_DIR/sendmail.dcgi|localhost|70]"
       -echo "[1|Get mail|$BASE_DIR/getmail.dcgi|localhost|70]"
       +echo "[1|Send mail|$BASE_DIR/sendmail.dcgi||70]"
       +echo "[1|Get mail|$BASE_DIR/getmail.dcgi||70]"
        
        echo '
        
   DIR diff --git a/src/geomyidae/sendmail.dcgi b/src/geomyidae/sendmail.dcgi
       @@ -12,18 +12,18 @@ query=$( find_value_in_args "query" "$path" )
        choose_mailbox() {
            ls -x1 "api/$MAILBOXES" \
                | awk -v t="$template" -v base_dir="$BASE_DIR" \
       -              '{ printf "[1|%s|/%ssendmail.dcgi?handle=%s?template=%s|localhost|70]\n", $1, base_dir, $1, t }'
       +              '{ printf "[1|%s|/%ssendmail.dcgi?handle=%s?template=%s||70]\n", $1, base_dir, $1, t }'
        }
        
        choose_template() {
            ls -x1 "api/$TEMPLATES" \
                | xargs -d '\n' -I x cat "api/$TEMPLATES/"x"/info" \
                | awk -F '\t' -v h="$handle" -v base_dir="$BASE_DIR" \
       -              '{ printf "[1|%s|/%ssendmail.dcgi?template=%s?handle=%s|localhost|70]\n", $2, base_dir, $1, h }'
       +              '{ printf "[1|%s|/%ssendmail.dcgi?template=%s?handle=%s||70]\n", $2, base_dir, $1, h }'
        }
        
        show_footer() {
       -    printf "\n\n[1|Start over|$BASE_DIR/sendmail.dcgi|localhost|70]"
       +    printf "\n\n[1|Start over|$BASE_DIR/sendmail.dcgi||70]"
        }
        
        if [ -z "$handle" ]; then
       @@ -53,7 +53,7 @@ fi
        if [ -z "$skip_review" ]; then
            printf "Review your mail before sending:\n\n"
            printf "%s\n\n" "$result"
       -    printf "[1|Send it|%s|localhost|70]\n" "$SELECTOR?skip_review=1?query=$query"
       +    printf "[1|Send it|%s||70]\n" "$SELECTOR?skip_review=1?query=$query"
            show_footer
            return 0
        fi
       @@ -68,7 +68,7 @@ printf "%s,%s\n" "$timestamp" "$result" >> "$mailbox"
        cd ..
        
        printf "Mail sent!\n"
       -printf "[1|Return to main office|/|localhost|70]"
       +printf "[1|Return to main office|/||70]"
        
        # todo: prevent resubmission of mail, maybe with a session token tied
        # to the `skip_review` arg. the token could be stored and checked in a