add a submit form for adding entries to the gopher lawn through annna-say - gopher-lawn - The gopher lawn gopher directory project.
 (HTM) git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-lawn/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
       ---
 (DIR) commit a2550891a06d93bf189cdb1c18bc379a1e132dd2
 (DIR) parent f53153652d0cf17bb5a84d2c8809076d69b162b2
 (HTM) Author: Josuah Demangeon <me@josuah.net>
       Date:   Fri, 26 Jun 2020 22:19:28 +0200
       
       add a submit form for adding entries to the gopher lawn through annna-say
       
       It is based on ./search.dcgi, and uses ./search.sh for showing links
       under the same domain.
       
       Improvements could be checking that the link is valid, trying to access the
       website, validate the content, etc...
       
       It only displays links onto IRC.
       
       Signed-off-by: Christoph Lohmann <20h@r-36.net>
       
       Diffstat:
         A submit.dcgi                         |      38 +++++++++++++++++++++++++++++++
       
       1 file changed, 38 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/submit.dcgi b/submit.dcgi
       @@ -0,0 +1,38 @@
       +#!/bin/sh
       +
       +IDX="index.gph"
       +STRIP="/lawn/"
       +
       +search="$1"
       +arguments="$2"
       +host="$3"
       +port="$4"
       +
       +domain=$(printf "%s" "${search}" | sed 's,gopher://,,; s,/.*,,')
       +
       +printf "\n"
       +printf "                       T H E   G O P H E R  L A W N\n"
       +printf "\n"
       +printf "________________________________S_U_B_M_I_T_______________________________\n"
       +
       +if [ -z "${search}" ];
       +then
       +        printf "Please enter the link to propose for the lawn.\n"
       +        printf "[7|Gopher Lawn Submission|/lawn/submit.dcgi|server|port]\n"
       +        printf "This will post the link to irc://irc.freenode.net/#bitreich-lawn\n"
       +else
       +        /home/annna/bin/annna-say -c "#bitreich-lawn" \
       +                "new link proposed: ${search}"
       +
       +        printf "Entry submitted\n"
       +        printf "\n"
       +        printf "Join #bitreich-lawn at irc.freenode.net to talk about it.\n"
       +        printf "\n"
       +        printf "Here is what we already have from that same domain:\n"
       +        ./search.sh "|${domain}|"
       +        printf "\n"
       +        printf "[7|Submit Again|/lawn/submit.dcgi|server|port]\n"
       +fi
       +
       +printf "\n"
       +printf "[1|Back to the lawn.|/lawn|server|port]\n"