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" == "-rf" ] ; then
22 echo "todas las cápsulas borradas"
28 if [ "$1" == "-c" ] ; then
29 echo "cápsulas copiadas"
34 if [ "$1" == "-r" ] ; then
35 echo "cápsulas eliminadas"
40 if [ "$1" == "-l" ] ; then
41 echo "listado de cápsulas visitadas"
42 ls -alis /tmp/gemini:*
46 if [ "$1" == "-V" ] ; then
47 echo " Gemini-Bash cliente minimalista."
48 echo " Gemini-Bash, Versión 10.06.21"
49 echo " (C) 2021 Fabián Bonetti"
50 echo " Correo: mama21mama2000@yahoo.com.ar gemini://reisub.nsupdate.info/fabianbonetti/"
54 if [ "$1" == "-h" ] ; then
55 echo " Gemini-Bash cliente minimalista."
58 echo " $`basename $0` [-h] [-V] [-l] [-r] [-c] [-rf]"
61 echo " $`basename $0` dominio cápsula página"
64 echo " $`basename $0` dominio cápsula libros/index.gmi"
65 echo " Nota: la ultima variable se puede usar como subcarpetas."
67 echo " Sintaxis 3: Modo Pregunta"
68 echo " $`basename $0`"
71 echo " $`basename $0` reisub.nsupdate.info %s user.gemini"
72 echo " Nota: gemini://reisub.nsupdate.info/user.gemini"
75 echo " $`basename $0` reisub.nsupdate.info fabianbonetti atom.xml"
76 echo " Nota: gemini://reisub.nsupdate.info/fabianbonetti/atom.xml"
79 echo " Visitamos la imagen"
80 echo " $`basename $0` reisub.nsupdate.info fabianbonetti media/2021/tags.jpg"
82 echo " Listamos los archivos vistos y Visualizamos"
83 echo " $`basename $0` -l"
84 echo -e " \$gpaint /tmp/gemini:reisub.nsupdate.info_fabianbonetti_10062021_140842"
88 filedate=$(date +'%d%m%Y_%H%M%S')
93 echo "ejemplo: reisub.nsupdate.info"
94 read -p 'Dominio: ' dominio
96 read -p 'Cápsula: ' uservar
98 read -p 'Página (sin extension): ' paginavar
100 read -p "index.gemini (1) index.gmi (2)?" CONT
101 if [ "$CONT" = "1" ]; then
103 printf "gemini://$dominio:1965/$uservar/$paginavar$index\r\n\r\n" | openssl s_client -quiet -connect $dominio:1965 > /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index" && sed -i -e '1d' /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index" && less /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index"
106 printf "gemini://$dominio:1965/$uservar/$paginavar$index\r\n\r\n" | openssl s_client -quiet -connect $dominio:1965 > /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index" && sed -i -e '1d' /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index" && less /tmp/gemini:"$dominio"_"$uservar"_"$paginavar$index"
109 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" && less /tmp/gemini:"$dominio"_"$uservar"_"$filedate"