From 4a1bcfd6d9da2a8acce81ff74f871182cd933dde Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 26 May 2020 19:31:06 -0500 Subject: Add Makefiles --- Makefile | 12 ++++---- bollux.1 | 69 +++++++++++++++++++++++++++++++++++++++++++++ bollux.conf.5 | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+), 5 deletions(-) create mode 100644 bollux.1 create mode 100644 bollux.conf.5 diff --git a/Makefile b/Makefile index 3096726..0c98bff 100644 --- a/Makefile +++ b/Makefile @@ -4,16 +4,18 @@ PREFIX ?= /usr -PRGN := bollux - .PHONY: def install uninstall def: @echo "run 'make install' to install" @echo "run 'make uninstall' to uninstall" -install: $(PRGN) - install -D $< $(DESTDIR)$(PREFIX)/bin +install: + install -Dt $(DESTDIR)$(PREFIX)/bin/ bollux + install -Dt $(DESTDIR)$(PREFIX)/share/man/man1/ bollux.1 + install -Dt $(DESTDIR)$(PREFIX)/share/man/man5/ bollux.conf.5 uninstall: - rm -f $(DESTDIR)$(PREFIX)/bin/$(PRGN) + rm -f $(DESTDIR)$(PREFIX)/bin/bollux + rm -f $(DESTDIR)$(PREFIX)/share/man/man1/bollux.1 + rm -f $(DESTDIR)$(PREFIX)/share/man/man5/bollux.conf.5 diff --git a/bollux.1 b/bollux.1 new file mode 100644 index 0000000..e4184d5 --- /dev/null +++ b/bollux.1 @@ -0,0 +1,69 @@ +.TH bollux 1 2020-05-26 +.SH NAME +bollux \- gemini protocol browser written in bash(1) +.SH SYNOPSIS +.B bollux +.RI [ \-h ] +.TP +.B bollux +.RI [ \-q ] +.RI [ \-v ] +.RI [ \-c +.BR CONFIG ] +.RB [ URL ] +.SH DESCRIPTION +.BR bollux (1) +is a browser for the new Gemini protocol, which aims to be +"heavier than gopher, but lighter than the web." +It can follow links, collect user input, download files, and display text/* mimetype pages in geminispace. +.SH OPTIONS +.TP +.B \-h +Display an inline help screen and exit +.TP +.B \-q +Be quiet: don't show any messages, even fatal ones +.TP +.B \-v +Be verbose: show all messages, even debug ones +.TP +.B \-c CONFIG +Use CONFIG file to configure +.BR bollux (1) +instead of the default: $XDG_CONFIG_HOME/bollux/bollux.conf. +.TP +.B URL +The gemini URL to navigate to +.SH USAGE +If +.BR bollux (1) +is invoked with a URL, it will download or display that URL. +Otherwise, the user will be prompted for a URL to download or display. +If the URL points to a text/* document, it is paged with +.BR less (1) +with custom keybinds: +.TP +.B o +open a link on the current page +.TP +.B g +goto a new URL +.TP +.B r +refresh the current page +.TP +.B q +quit bollux +.PP +If a new URL is selected, +.BR bollux (1) +will repeat the download-and-display loop with the new URL. +.SH ISSUES +There is currently no history storage or recall. +.BR bollux (1) +can get confused on some URLs \-\- munging them correctly is an area of active research. +.SH SEE ALSO +.BR bollux.conf (5) +.SH BUGS +The development repo is located at https://sr.ht/~acdw/bollux. +Please direct all bug reports, patches, or general complaints there. diff --git a/bollux.conf.5 b/bollux.conf.5 new file mode 100644 index 0000000..eada1de --- /dev/null +++ b/bollux.conf.5 @@ -0,0 +1,89 @@ +.TH bollux.conf 5 2020-05-26 +.SH NAME +.B bollux.conf +\- configuration file for +.BR bollux (1) +.SH DESCRIPTION +.BR bollux (1) +uses a number of environment variables that can be sourced from an external file, +usually placed in +.IR $XDG_CONFIG_HOME/bollux/bollux.conf . +The location can be changed at runtime by invoking +.BR "bollux \-c CONFIG" . +.SH VARIABLES +.SS Variables you might actually want to set +Here are actually useful variables that are good things to set in your +.IR bollux.conf , +in order of usefulness. +.TP +.BR BOLLUX_URL " valid values are URLs; default is ''." +If +.B BOLLUX_URL +is set, +.BR bollux (1) +loads that resource; +otherwise it asks the user for where to go. +Setting this variable works like setting a home page. +.TP +.BR BOLLUX_DOWNDIR " valid values are directories; default is '.'." +The directory to attempt to save downloads in. +.BR bollux (1) +will attempt to download anything whose mimetype isn't +.IR text/* , +and it tries to place it in +.BR BOLLUX_DOWNDIR . +If it can't open the directory, save the file, +or if there's another file with the same name, +.BR bollux (1) +will report the name of the temporary file it saved. +.TP +.BR BOLLUX_MAXREDIR " valid values are integers; default is '5'." +The maximum number of redirects before +.BR bollux (1) +decides to quit. +The default is 5 as per some RFC spec. +.TP +.BR BOLLUX_LOGLEVEL " valid values are '', DEBUG or QUIET; default is ''." +How verbose +.BR bollux (1) +should be. +.I DEBUG +prints debug-level messages. +.I QUIET +suppresses even error-level messages. +I'm going to be honest, +the difference between the levels is somewhat arbitrary. +So. +.SS Variables that could be configured, but probably shouldn't be +These variables control deeper aspects of +.BR bollux (1)'s +workings. +It's possible they could be tweaked to make +.BR bollux (1) +work differently, like browsing gopher instead of gemini, +but that capability has not been tested. +.TP +.BR BOLLUX_PORT " valid values are port numbers (1-65535); default is '1965'." +The port +.BR bollux (1) +tries to connect to on the server. +.TP +.BR BOLLUX_PROTO " valid values are protocol names (strings); default is 'gemini'." +The protocol to use. +.TP +.BR BOLLUX_LESSKEY " valid values are files; default is '/tmp/bollux-lesskey'." +Where to store the generated +.BR lesskey (1) +file. +.TP +.BR BOLLUX_PAGESRC " valid values are files; default is '/tmp/bollux-src'." +Where to store the page source of the site being visited. +It's not used right now by +.BR bollux (1), +but you could ... +.BR cat (1) +it? +.SH FILES +.I $XDG_CONFIG_HOME/bollux/bollux.conf +.SH SEE ALSO +.BR bollux (1) -- cgit 1.4.1-21-gabe81