diff --git a/Makefile b/Makefile index a58edfd..b0f0133 100644 --- a/Makefile +++ b/Makefile @@ -2,19 +2,19 @@ PREFIX ?= ~/.local BINDIR?=$(PREFIX)/bin -DOCDIR?=$(PREFIX)/share/doc/astro +DOCDIR?=$(PREFIX)/share/doc/ereandel MANDIR?=$(PREFIX)/share/man/man1 -LICENSEDIR?=$(PREFIX)/share/doc/astro +LICENSEDIR?=$(PREFIX)/share/doc/ereandel install: mkdir -p $(BINDIR) $(DOCDIR) $(LICENSEDIR) $(MANDIR) - install -m +rx astro -t $(BINDIR) + install -m +rx ereandel -t $(BINDIR) install -m +r README.md CONTRIBUTING.md -t $(DOCDIR) install -m +r LICENSE -t $(LICENSEDIR) - install -m +r astro.en.1 $(MANDIR)/astro.1 + install -m +r ereandel.en.1 $(MANDIR)/ereandel.1 uninstall: - rm $(BINDIR)/astro + rm $(BINDIR)/ereandel rm -rf $(DOCDIR) rm -rf $(LICENSEDIR) - rm -f $(MANDIR)/astro.1 + rm -f $(MANDIR)/ereandel.1 diff --git a/README.md b/README.md index b2fd396..e98f04a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# astro +# ereandel -![print](https://github.com/blmayer/astro/blob/main/astro.png?raw=true) +![print](https://github.com/blmayer/ereandel/blob/main/ereandel.png?raw=true) > A Gemini web browser using shell script @@ -8,10 +8,10 @@ There is an AUR package for archlinux users: -[![astro](https://img.shields.io/aur/version/astro?label=astro&logo=arch-linux)](https://aur.archlinux.org/packages/astro) -[![astro-git](https://img.shields.io/aur/version/astro-git?label=astro-git&logo=arch-linux)](https://aur.archlinux.org/packages/astro-git) +[![ereandel](https://img.shields.io/aur/version/ereandel?label=ereandel&logo=arch-linux)](https://aur.archlinux.org/packages/ereandel) +[![ereandel-git](https://img.shields.io/aur/version/ereandel-git?label=ereandel-git&logo=arch-linux)](https://aur.archlinux.org/packages/ereandel-git) -You can also move the file *astro* to a folder in your PATH variable, +You can also move the file *ereandel* to a folder in your PATH variable, or run `make install`, by default it will be installed into *~/.local/bin*. Use *PREFIX* to override the install location, e.g. @@ -20,25 +20,25 @@ Use *PREFIX* to override the install location, e.g. ## Using -Start browsing by running astro with an optional URL: +Start browsing by running ereandel with an optional URL: -`astro gemini://rawtext.club:1965/~sloum/spacewalk.gmi` +`ereandel gemini://rawtext.club:1965/~sloum/spacewalk.gmi` you can omit the protocol and port: -`astro rawtext.club/~sloum/spacewalk.gmi` +`ereandel rawtext.club/~sloum/spacewalk.gmi` no arguments takes you to *gemini.circumlunar.space*: -`astro` +`ereandel` ### Client certificates -astro can work with client certificates if capsules requires them for authentication. +ereandel can work with client certificates if capsules requires them for authentication. -astro 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. +ereandel 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 astro can't find one it will show you a command to create a client cert for the capsule. The certificates are stored in `~/.config/astro/certs/`. +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 `~/.config/ereandel/certs/`. To remove a certificate simply delete the `.crt` and `.key` files in the directory mentioned above. @@ -60,12 +60,12 @@ More coming. ### Configuration -You can setup a config file at `~/.config/astro/astro.conf` to configure *astro* the way you like. +You can setup a config file at `~/.config/ereandel/ereandel.conf` to configure *ereandel* the way you like. The file uses a simple `key=value` style, see the complete example for the default values below. **hints:** -* `astro` will be appended to `cachehome`, the directory must be writable for your user. +* `ereandel` will be appended to `cachehome`, the directory must be writable for your user. * The `style-` keys must be ANSI style codes. ``` diff --git a/astro b/ereandel similarity index 92% rename from astro rename to ereandel index 13a7b56..09ca354 100755 --- a/astro +++ b/ereandel @@ -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: bleemayer@gmail.com" - echo "Home page: " - echo "General help: " + echo "Home page: " + echo "General help: " } version() { - echo "astro $version" + echo "ereandel $version" echo "" echo "Copyright (C) 2021-2023 Brian Mayer." echo "License MIT: MIT License " @@ -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) diff --git a/astro.en.1 b/ereandel.en.1 similarity index 61% rename from astro.en.1 rename to ereandel.en.1 index 0dc3238..bab77a1 100644 --- a/astro.en.1 +++ b/ereandel.en.1 @@ -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.crt\fR and \fI.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: bleemayer@gmail.com .br -Home page: +Home page: .br -General help: +General help: .SH COPYRIGHT Copyright \(co 2021\-2023 Brian Mayer. License MIT: MIT License @@ -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. diff --git a/astro.png b/ereandel.png similarity index 100% rename from astro.png rename to ereandel.png