A simple Gopher client for KaiOS
git clone git://git.luxferre.top/kopher.git
Log | Files | Refs | README | LICENSE

commit 1a3e5e06dd97f336a8dd19b4e6834e803ff270c5
parent e60c71085ccf6b3c7930d6fdd1c19b2076bb877d
Author: Luxferre <lux@ferre>
Date:   Mon,  3 Apr 2023 17:02:04 +0300

prepared the readme to v0.0.6

MREADME.md | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -112,12 +112,16 @@ As of April 2023, Kopher implements a subset of ANSI terminal escape codes for t - they are applied to the Gophermap information lines **only** (and detected and deleted everywhere else); - they only work within the single infoline or a block of sequential infolines and all styling gets reset when another entry type is encountered, even if the reset sequence isn't there; -- only the basic 8/16-color palette is implemented (because these codes physically translate into corresponding data attributes); +- only the basic 16-color palette is implemented (because these codes physically translate into corresponding data attributes); - beside the colors, the following text attributes are implemented: bold, italic, underline, blinking, inverse, hidden, strikethrough; - any unsupported escape sequences are automatically deleted from the rendered output. All these limitations are intended to keep Kopher's codebase simple, and not likely to change in the foreseeable future. +## How does Kopher integrate with the rest of KaiOS? + +It almost doesn't. But, whatever could be done without hacks, has been done since the version 0.0.6. First, you can share the current URL (in the `gopher://` format) using Bluetooth/Messages/Email share menu (if you select Bluetooth or any other provider that requires blobs, it gets sent as a vCard 2.1 file with the `N` and `URL` fields set to the same value) by pressing `*` and Call key. Second, Kopher itself registers a `view` activity handler for every URL that starts with `gopher:`. If you just updated Kopher to version 0.0.6, you need to reboot your phone for this feature to start working. For some reason, `gopher:` URLs still aren't picked up by the stock KaiOS browser or the `window.open()` call, but any other application that sends URLs to the `view` activity according to the spec should be able to open `gopher://` URLs in Kopher. + ## Can I use the hi01379.js library in non-KaiOS environments? Yes, but you'll need to supply your own `gopherRequest(resource, input, successCb, errorCb)` function/method that performs the actual resource download over TCP. The `success` callback must always return a raw binary data string. See the js/transport.js file for the reference of how it's done for KaiOS (using mozTCPSocket API).