-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
myr
committed
Jul 20, 2024
1 parent
8f057b7
commit edba2bc
Showing
5 changed files
with
62 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#!/bin/sh | ||
|
||
version="0.25.1" | ||
version="0.26.0" | ||
|
||
usage() { | ||
echo "astro v$version: Browse the gemini web on the terminal." | ||
echo "ereandel v$version: Browse the gemini web on the terminal." | ||
echo "" | ||
echo "Usage: astro [URL]|[OPTION]" | ||
echo "Usage: ereandel [URL]|[OPTION]" | ||
echo "" | ||
echo "Options:" | ||
echo " -h, --help show this help" | ||
echo " -v, --version show version info" | ||
echo "" | ||
echo "Configuration:" | ||
echo "You can setup a config file at ~/.config/astro/astro.conf to configure *astro* the way you like." | ||
echo "You can setup a config file at ~/.config/ereandel/ereandel.conf to configure *ereandel* the way you like." | ||
echo "" | ||
echo "Commands:" | ||
echo "These are the default keybindings to use while running astro:" | ||
echo "These are the default keybindings to use while running ereandel:" | ||
echo "" | ||
echo " q quit" | ||
echo " g go to a link" | ||
|
@@ -30,17 +30,17 @@ usage() { | |
echo " K remove bookmark for current url" | ||
echo "" | ||
echo "Examples:" | ||
echo " astro Start browsing the default webpage" | ||
echo " astro url Start browsing url" | ||
echo " astro --help Show help" | ||
echo " ereandel Start browsing the default webpage" | ||
echo " ereandel url Start browsing url" | ||
echo " ereandel --help Show help" | ||
echo "" | ||
echo "Report bugs to: [email protected]" | ||
echo "Home page: <https://www.github.com/blmayer/astro/>" | ||
echo "General help: <https://www.github.com/blmayer/astro/wiki>" | ||
echo "Home page: <https://www.github.com/blmayer/ereandel/>" | ||
echo "General help: <https://www.github.com/blmayer/ereandel/wiki>" | ||
} | ||
|
||
version() { | ||
echo "astro $version" | ||
echo "ereandel $version" | ||
echo "" | ||
echo "Copyright (C) 2021-2023 Brian Mayer." | ||
echo "License MIT: MIT License <https://opensource.org/licenses/MIT>" | ||
|
@@ -90,13 +90,13 @@ tput smcup | |
|
||
# Configuration | ||
confighome=${XDG_CONFIG_HOME:-$HOME/.config} | ||
mkdir -p "$confighome/astro" | ||
configfile="$confighome/astro/astro.conf" | ||
bookmarkfile="$confighome/astro/bookmarks" | ||
certdir="$confighome/astro/certs" | ||
mkdir -p "$confighome/ereandel" | ||
configfile="$confighome/ereandel/ereandel.conf" | ||
bookmarkfile="$confighome/ereandel/bookmarks" | ||
certdir="$confighome/ereandel/certs" | ||
mkdir -p "$certdir" | ||
|
||
cachedir="${XDG_CACHE_HOME:-$HOME/.cache}/astro" | ||
cachedir="${XDG_CACHE_HOME:-$HOME/.cache}/ereandel" | ||
|
||
# Default values | ||
|
||
|
@@ -477,7 +477,7 @@ fetch() { | |
debug "requesting $1://$2:$3/$4$5" | ||
|
||
# set title | ||
printf '\033]2;%s\007' "astro (c): $2/$4" | ||
printf '\033]2;%s\007' "ereandel (c): $2/$4" | ||
|
||
echo "$1 $2 $3 $4 $5" >> "$histfile" | ||
|
||
|
@@ -499,7 +499,7 @@ fetch() { | |
stop "openssl fetch" | ||
stop | ||
|
||
printf '\033]2;%s\007' "astro (r): $2/$4" | ||
printf '\033]2;%s\007' "ereandel (r): $2/$4" | ||
|
||
# First line is status and meta information | ||
read -r status meta < "$pagefile" | ||
|
@@ -613,14 +613,14 @@ fetch() { | |
esac | ||
debug "charset: $charset" | ||
|
||
printf '\033]2;%s\007' "astro (t): $2/$4" | ||
printf '\033]2;%s\007' "ereandel (t): $2/$4" | ||
case $meta in | ||
"text/gemini"* | "") typesetgmi < "$pagefile" > "$pagefile.gmi"; mv "$pagefile.gmi" "$pagefile" ;; | ||
*) ;; | ||
esac | ||
|
||
debug "starting pager" | ||
printf '\033]2;%s\007' "astro (l): $2/$4" | ||
printf '\033]2;%s\007' "ereandel (l): $2/$4" | ||
pager "$pagefile" | ||
|
||
debug "new url: $url" | ||
|
@@ -637,7 +637,7 @@ fi | |
url="${url:-$homepage}" | ||
while : | ||
do | ||
printf '\033]2;%s\007' "astro (w)" | ||
printf '\033]2;%s\007' "ereandel (w)" | ||
|
||
# shellcheck disable=SC2046 | ||
fetch $(parseurl) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
.TH ASTRO "1" "November 2023" "astro 0.25.1" "User Commands" | ||
.TH EREANDEL "1" "November 2023" "ereandel 0.26.0" "User Commands" | ||
.SH NAME | ||
astro \- A Gemini web browser using shell script | ||
ereandel \- A Gemini web browser using shell script | ||
.SH SYNOPSIS | ||
.B astro | ||
.B ereandel | ||
[\fI\,URL\/\fR]\fI\,|\/\fR[\fI\,OPTION\/\fR] | ||
.SH DESCRIPTION | ||
astro v0.25.1: Browse the gemini web on any POSIX compatible terminal. | ||
ereandel v0.26.0: Browse the gemini web on any POSIX compatible terminal. | ||
.SH OPTIONS | ||
.TP | ||
\fB\-h\fR, \fB\-\-help\fR | ||
|
@@ -14,7 +14,7 @@ show this help | |
\fB\-v\fR, \fB\-\-version\fR | ||
show version info | ||
.SH COMMANDS | ||
These are the default keybindings to use while running astro: | ||
These are the default keybindings to use while running ereandel: | ||
.TP | ||
\fBq | ||
quit | ||
|
@@ -49,24 +49,24 @@ go to a bookmark | |
\fBK | ||
remove bookmark for current url | ||
.SH ENVIRONMENT | ||
Astro uses 2 environment variables to help debugging and tracing its execution. | ||
Ereandel uses 2 environment variables to help debugging and tracing its execution. | ||
.TP | ||
\fIdebug | ||
To start astro in debug mode | ||
To start ereandel in debug mode | ||
.TP | ||
\fItrace | ||
To start astro with tracing activated | ||
To start ereandel with tracing activated | ||
.SH NOTES | ||
.SS Client certificates | ||
.PP | ||
\fBastro\fR can work with client certificates if capsules requires them for authentication. | ||
\fBastro\fR allows a single client certificate per (sub)domain identified by it's name. If a client cert for a specific domain is available astro will send it to the server with every request. | ||
When a resource requires a client cert and astro can't find one it will show you a command to create a client cert for the capsule. | ||
The certificates are stored in \fI$XDG_CONFIG_DIR/astro/certs/\fR. | ||
\fBereandel\fR can work with client certificates if capsules requires them for authentication. | ||
\fBereandel\fR allows a single client certificate per (sub)domain identified by it's name. If a client cert for a specific domain is available ereandel will send it to the server with every request. | ||
When a resource requires a client cert and ereandel can't find one it will show you a command to create a client cert for the capsule. | ||
The certificates are stored in \fI$XDG_CONFIG_DIR/ereandel/certs/\fR. | ||
.PP | ||
To remove a certificate simply delete the \fI<domain>.crt\fR and \fI<domain>.key\fR files in the directory mentioned above. | ||
.SH CONFIGURATION | ||
You can setup a config file at \fI$XDG_CONFIG_DIR/astro/astro.conf\fR to configure \fBastro\fR the way you like. | ||
You can setup a config file at \fI$XDG_CONFIG_DIR/ereandel/ereandel.conf\fR to configure \fBereandel\fR the way you like. | ||
The file uses a simple \fBkey=value\fR style, see the complete example for the default values below. | ||
.PP | ||
.EX | ||
|
@@ -94,22 +94,22 @@ homekey='H' | |
.EE | ||
.SH EXAMPLES | ||
.TP | ||
astro | ||
ereandel | ||
Start browsing the default webpage | ||
.TP | ||
astro url | ||
ereandel url | ||
Start browsing url | ||
.TP | ||
astro \-\-help | ||
ereandel \-\-help | ||
Show help | ||
.SH AUTHOR | ||
Written by Brian Lee Mayer. | ||
.SH "REPORTING BUGS" | ||
Report bugs to: [email protected] | ||
.br | ||
Home page: <https://www.github.com/blmayer/astro/> | ||
Home page: <https://www.github.com/blmayer/ereandel/> | ||
.br | ||
General help: <https://www.github.com/blmayer/astro/wiki> | ||
General help: <https://www.github.com/blmayer/ereandel/wiki> | ||
.SH COPYRIGHT | ||
Copyright \(co 2021\-2023 Brian Mayer. | ||
License MIT: MIT License <https://opensource.org/licenses/MIT> | ||
|
@@ -118,13 +118,13 @@ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
.SH "SEE ALSO" | ||
The full documentation for | ||
.B astro | ||
.B ereandel | ||
is maintained as a Texinfo manual. If the | ||
.B info | ||
and | ||
.B astro | ||
.B ereandel | ||
programs are properly installed at your site, the command | ||
.IP | ||
.B info astro | ||
.B info ereandel | ||
.PP | ||
should give you access to the complete manual. |
File renamed without changes