2 # Gemini-Bash Versión 10.06.21
4 # Copyright 2021 Fabián Bonetti <mama21mama2000@yahoo.com.ar>
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 if [ "$1" == "-r" ] ; then
26 if [ "$1" == "-l" ] ; then
31 if [ "$1" == "-V" ] ; then
32 echo " Gemini-Bash cliente minimalista."
33 echo " Gemini-Bash, Versión 10.06.21"
34 echo " (C) 2021 Fabián Bonetti"
35 echo " Correo: mama21mama2000@yahoo.com.ar gemini://reisub.nsupdate.info/fabianbonetti/"
39 if [ "$1" == "-h" ] ; then
40 echo " Gemini-Bash cliente minimalista."
43 echo " $`basename $0` [-h] [-V] [-l] [-r]"
46 echo " $`basename $0` dominio cápsula página"
49 echo " $`basename $0` dominio cápsula libros/index.gmi"
50 echo " Nota: la ultima variable se puede usar como subcarpetas."
52 echo " Sintaxis 3: Modo Pregunta"
53 echo " $`basename $0`"
56 echo " $`basename $0` reisub.nsupdate.info %s user.gemini"
57 echo " Nota: gemini://reisub.nsupdate.info/user.gemini"
60 echo " $`basename $0` reisub.nsupdate.info fabianbonetti atom.xml"
61 echo " Nota: gemini://reisub.nsupdate.info/fabianbonetti/atom.xml"
64 echo " Visitamos la imagen"
65 echo " $`basename $0` reisub.nsupdate.info fabianbonetti media/2021/tags.jpg"
67 echo " Listamos los archivos vistos y Visualizamos"
68 echo " $`basename $0` -l"
69 echo -e " \$gpaint /tmp/gemini:reisub.nsupdate.info_fabianbonetti_10062021_140842"
73 filedate=$(date +'%d%m%Y_%H%M%S')
78 echo "ejemplo: reisub.nsupdate.info"
79 read -p 'Dominio: ' dominio
81 read -p 'Cápsula: ' uservar
83 read -p 'Página (sin extension): ' paginavar
85 read -p "index.gemini (1) index.gmi (2)?" CONT
86 if [ "$CONT" = "1" ]; then
88 printf "gemini://$dominio:1965/$uservar/$paginavar$index\r\n\r\n" | openssl s_client -quiet -connect $dominio:1965 > /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index" && clear && cat /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index" | sed '1d'
91 printf "gemini://$dominio:1965/$uservar/$paginavar$index\r\n\r\n" | openssl s_client -quiet -connect $dominio:1965 > /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index" && clear && cat /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index" | sed '1d'
94 printf "gemini://$dominio:1965/$uservar/$paginavar$index\r\n\r\n" | openssl s_client -quiet -connect $dominio:1965 > /tmp/gemini:"$dominio"_"$uservar"_"$filedate" && sed -i -e '1d' /tmp/gemini:"$dominio"_"$uservar"_"$filedate" && clear && cat /tmp/gemini:"$dominio"_"$uservar"_"$filedate"