Giter Site home page Giter Site logo

equwal / clic Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.19 MB

MIRROR ONLY Gopher client with pretty colours in Common Lisp

License: BSD 2-Clause "Simplified" License

Common Lisp 95.36% Makefile 0.30% Shell 0.45% HTML 2.45% CSS 0.22% C 1.13% Batchfile 0.01% Roff 0.07% NewLisp 0.01%

clic's Introduction

Introduction

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...

Clic supports TLS connections by first trying to speak TLS to the remote server, if it doesn't work, it falls back to plaintext. The status prompt will show either "TLS" or "UNSECURE" depending on how the communication has been negotiated.

Requirements

clic requires a few dependencies:

  • ANSI compatible terminal emulator
  • ecl common lisp interpreter
  • C compiler
  • Linux/OpenBSD/FreeBSD/NetBSD

How to build

clic binary must be compiled.

To compile it with ecl, it's really easy type the following command:

make

then you can use make install to deploy it in /usr/bin/.

The binary will be linked to ecl shared library. You need to install ecl if you want to deploy clic binary on others systems.

How to use clic

By default clic will load the page gopherproject/1/ with a number on the left of each link. Please type the number of a link to 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"
  • p : previous page
  • h : display history
  • r : reload the page
  • x or q or ^D : quit
  • sNUMBER : show the gopher url for link $number
  • / pattern : redisplay the menu only with lines containing string (no regex)
  • d : display the raw response

In addition to the previous keybinding, a different layout coexists, permitting clic to be used with the numpad with only one hand:

  • "a number" : follow the link "number
  • / : previous page
    • : reload the page
  • . : quit

Command line usage

clic [-t] [-k] [url|file]

If you start clic with the -t option, menus will be displayed in a single operation, instead of asking to display next page once it reaches your terminal size.

If you start clic with the -k option, then kiosk mode is enabled, in which case it won't call any external program or save any data to disk. Texts (type 0) will be shown as-is in the output. It only allows the use of texts, menus and searches.

If you pass a gopher url to clic (gopher:// isn't mandatory for the url), the behavior will be determined by two parameters:

  1. is the output a pipe/redirection ?
  2. is the url type a menu ? (types 1 or 7)

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)

If the output is the terminal, clic will download the file in the /tmp/ folder, then call $PAGER if the type is 0 (text) or xdg-open for others types.

If the url is a type 0 or 7 and the output is a terminal, it will open clic and stay in interactive mode.

Clic can open a local file respecting the gopher menu protocol, this can be used to create a bookmark file and load it locally without a gopher server. In order to proceed, you need to pass the file path as a parameter beginning with file://, as in the following example:

clic file://path/to/my_file.txt

clic's People

Contributors

cbracken avatar iamleot avatar rapenne-s avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.