Giter Site home page Giter Site logo

gmir's Introduction

gmir is a reader for gmi files (of the Gemini protocol). Its goal is to make reading gmi files more pleasant than with a pager like less, while also offering link selection.

Features include word wrapping, syntax highlighting, jumping to headings through a table of contents and more.

The link selection feature is intended to make gmir well suited as the pager for Gemini browsers like acdw/bollux, chambln/gmi or blmayer/astro. Unlike with less, following links is possible without dropping back to a command prompt first. Once a link is selected, gmir quits and prints its URL to the standard output.

screenshot of gmir

Installation

You can find precompiled binaries at the releases page. If you prefer to install from source, execute this:

go install github.com/codesoap/gmir/cmd/gmir@latest

The gmir binary is now located at ~/go/bin/gmir. If you use Go version 1.15 or older, use go get instead.

Usage

$ gmir -h
Usage:
gmir [-u] [-t TITLE] [FILE]
If FILE is not given, standard input is read.

Options:
-u  Hide URLs of links by default
-t  Set a title that is displayed in the bar.

Key bindings:
Up, k     : Scroll up one line
Down, j   : Scroll down one line
Right, l  : Scroll right one column; reset with Esc
u         : Scroll up half a page
d         : Scroll down half a page
Page up, b: Scroll up a full page
Page down,
f, Space  : Scroll down a full page
g         : Go to the top
G         : Go to the bottom
h         : Go to next heading
H         : Go to previous heading
s         : Go to next paragraph
S         : Go to previous paragraph
t         : Show table of contents
/         : Start search
?         : Start reverse search
n         : Go to next search match
p         : Go to previous search match
0-9       : Select link or table of contents entry
Esc       : Clear input and right scroll or exit table of contents
v         : Hide link URLs
V         : Show link URLs
q         : Quit

TODO

Here are some ideas on what could be added in the future, in no particular order:

  • Add key bindings for going back, forward and reloading a page.

gmir's People

Contributors

codesoap avatar snan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

snan

gmir's Issues

choosing link drops back to shell

Nice to find someone working on an offline gemini reader. Thank you.

I am a non-coding end-user. My feedback is best taken with a grain of salt.
I use debian and have tested in a bash shell and the elvish shell (why not? and they give me a consistant error)

Clicking a link via gmir spits out the link filename but drops me back to the cli.
Ready that grain of salt. It seems like the looping mechanism is broken.

But to support the issue:
All *.gmi doc links are within the same folder and I made the index myself.
Running gmifs on the folder confirms it to be a working structure.

I pulled the @latest version and built as suggested. go version go1.19.5 linux/amd64 running on a chromebook.

Hope this is uesful. And would you mind opening up a discussion tab on this repo? It's handy to comment on non-critical things without opening and issue report. I'll surely be following developments.

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.