Update README - clic - Clic is an command line interactive client for gopher written in Common LISP HTML git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 86fd49cff30911ecdd2b5eca124561d9384726e7 DIR parent e44d7e9bf83b9f4f33612a9aa178cb05625c41a4 HTML Author: Solene Rapenne <solene@perso.pw> Date: Fri, 12 Jan 2018 12:17:09 +0100 Update README Diffstat: M README.md | 98 ++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 34 deletions(-) --- DIR diff --git a/README.md b/README.md @@ -1,10 +1,26 @@ -# Introduction +Introduction +============ -Clic (Common LISP Interactive Client) is a gopher client. The name is -a bad pun because **clic** is the sound of a mouse click while this -client is keyboard only... +Clic (Common LISP Interactive Client) is a terminal based gopher +client. The name is a bad pun, **clic** is the sound of a mouse click +but the software is keyboard driven... -It currently works with **ecl** and **sbcl** compilers. + +Requirements +============ + +clic requires a few dependencies : + + + ANSI compatible terminal emulator + + a Common LISP interpreter + + C compiler + + Linux/OpenBSD/FreeBSD/NetBSD + +Both **ecl** and **sbcl** Common LISP compilers are supported. + + +How to build +============ `clic` binary must be compiled. @@ -18,18 +34,16 @@ To compile it with **sbcl** : then you can use `make install` to deploy it in `/usr/bin/`. -**I (the author) recommend using ecl**. - -# Requirements +Note : when using sbcl, a shared library extension.o is created and +then sbcl creates a binary linked against the library. But ecl will +translate the whole lisp code to C and then compile it, but linking +against ecl. -You need a Common LISP interpreter like ecl or sbcl to use Clic. This -is only tested with Linux, OpenBSD and FreeBSD, it should works fine -on any Unix system. - -If you want to use ecl, you will need a C compiler. +**I (the author) recommend using ecl**. -# Information about the binary +Information about the binary +---------------------------- If you compile clic with ecl, you will need ecl library installed on the computer, the startup time is really fast. While compiling clic with SBCL will provide a standalone binary embedding the whole SBCL @@ -39,7 +53,9 @@ If you use OpenBSD and SBCL, you will need wxallowed mountflag on the partition from where you try to start clic standalone because sbcl has a W^X issue. -# Use it + +How to use clic +=============== By default *clic* will load the page **gopherproject/1/** with a number on the left of each link. Pleas type the number of a link to @@ -47,31 +63,45 @@ follow it. If it's a text, the $PAGER program will be called to show it, if it's a binary file (types g,I and 9) it will be downloaded into `/tmp/` and then `xdg-open` will be called on the filename. -## Keyboard bindings -- 1-999 : follow the link "number" -- a : add to bookmark (it saves the file too) -- b : display bookmarks and choose a link -- p : previous page -- h : display history -- r : reload the page -- x : quit shell mode -- q : quit shell mode +Keyboard bindings +----------------- + ++ 1-999 : follow the link "number" ++ a : add to bookmark (it saves the file too) ++ b : display bookmarks and choose a link ++ p : previous page ++ h : display history ++ r : reload the page ++ x : quit shell mode ++ q : quit shell mode In addition to the previous keybinding, a different layout coexists, permitting to use clic with the numpad with only one hand : -- "a number" : follow the link "number -- / : previous page -- * : reload the page -- - : display bookmarks -- + : add to bookmark -- . : quit ++ "a number" : follow the link "number ++ / : previous page ++ * : reload the page ++ - : display bookmarks ++ + : add to bookmark ++ . : quit + + +Command line usage +================== + +If you pass a gopher url to clic (gopher:// isn't mandatory for the +url), the behavor will change depending on two parameters : -# Command line +1. is the output a pipe/redirection ? +2. is the url type a menu ? (types 1 or 4) -If you call clic with an argument which is a request for a binary -type, clic will output the data to stdout. +If the output is a pipe or a redirection, clic will send the raw data +to stdout (text for type 0 and binary for others types) -Using "gopher://" at the start of an url isn't mandatory. +If the output is the terminal, clic will download the file in /tmp/ +folder and then call $PAGER if the type is 0 (text) or xdg-open for +others types. +If the url is a type 0 or 4 and the output is a terminal, it will open +clic and stay in interactive mode.