42d5556630 | ||
---|---|---|
Makefile | ||
README.md | ||
comm.c | ||
db.c | ||
db.h | ||
gemtext.c | ||
global.h | ||
log.c | ||
log.h | ||
lookup.c | ||
main.c | ||
sigil.c | ||
sigil.h | ||
url.c | ||
url.h |
README.md
spa - a Spartan Client powered by HorseWare
WIP!
spa
is an experimental, terminal, client for the Spartan Protocol, a minimized, unencrypted version of the Gemini protocol.
spa
is built as a proof of concept and a testbed for a slightly off-the-beaten path technology inspired by Whinam methodologies.
On the surface it is just a simplistic browser. Internally, an immutable logbase tracks every spartan URL ever encountered, assigning 4-character sigils for display and access. Sigils may be used instead of the URLs they represent, and are much easier to memorize, type in, or otherwise keep track of. The database acts as a URL-shortener, a bookmark system, and a history log.
Usage
spa <url>
to visit a spartan URL
spa <sigil>
to visit a sigil
Currently, the output is sent to the terminal, after generating appropriate sigils. Further navigation using sigils is now possible by re-invoking spa.
Sigils
Sigils are 4-character mnemonics assigned for each URL visited or rendered by spa
. Each character may be an uppercase alpha character (but not 'O' or 'I') or a digit (but not '0' or '1'). This allows for 32 possibilities representing 5 bits; 4 such characters provide for 20 bits, or 1M (1048576) possible URLs (sufficient for Spartan!)
Requirements
A linux machine with a GCC compiler.
Resources
The compiled binary is < 20K.
Upon installation, a db.log file is created in the .spa
directory. It will contain every spartan URL seen by the system. Each url is stored once and only once. In addition, db.map20 file is created containing an index for fast lookup (hashtable). The file is fixed at 4MB, but it is a sparse file and will generally take up substantially less (and never more) space.
Installing
Modify the Makefile to set your build folder, the folder into which spa will be placed (I keep a ~/bin directory which is in my PATH).
Create a .spa directory in your HOME (unless you want it elsewhere, but change the Makefile accordingly);
make
to build spa and move it to the specified bin directory.
make wipe
to create the log and index files in the .spa directory.