Add Makefiles
authorCase Duckworth <acdw@acdw.net>
Wed, 27 May 2020 00:31:06 +0000 (19:31 -0500)
committerCase Duckworth <acdw@acdw.net>
Wed, 27 May 2020 00:31:06 +0000 (19:31 -0500)
Makefile
bollux.1 [new file with mode: 0644]
bollux.conf.5 [new file with mode: 0644]

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