Skip to main content

Mercuriceratops

                              _---_  _---_
                             /     \/     \
                            /  __  !!  __  \                               x
                           (  ___  ||  ___  )                             .
                      .__---\  __  !!  __  /---__.                 .   .
                    /        \   _ || _   /        \           .
                   /      (O)=     ..     =(O)      \        .
                  |-          \         /  .         |         .
  (*)             |   .        /{}`  ´{}\            |       .
    \  (-)        |            \ c    c /       .    |\   .
     \V/          |        .    \  {}  /             |-\´
     ´\           |_             \    /   .          |--\´
      V            \   .   V      \/\7       7      /\---\´     ,
  (+) |             \       \      \/  .    /      /  \---\´___/\,
    \  (x)          /__      V=---_____---=V    .  _\  \________/´
    ´\v/            |        /--¨       ¨--\        |
   .. V .  ...    _/o^o^o^o^`\_           _/´^o^o^o^o\_   .  ..spitlo 2020
 __ .  . ____ ____ ____ _  _ ____ _ ____ ____ ____ ____ ___ ____ ___  ______>
    |\/| |___ |__/ |    |  | |__/ | |    |___ |__/ |__|  |  |  | |__] [__
    L  L |___ L  \ |___ |__| L  \ | |___ |___ L  \ L  |  L  |__| L  _____]
 - -- ----- ---- ---------------------------- ---- -------------- -/-- --- - +

A Gemini client written for Deno

This is a very basic client for Gemini, inspired by the 100 LOC demos by solderpunk. Mainly to try Deno, but also to test the Gemini protocol.

Install

Assuming Deno is installed and Deno bin is added to path:

$ deno install --allow-net -n merc https://denopkg.com/spitlo/mercuriceratops@v1.0.0

Run from source

Assuming Deno is installed:

$ cd mercuriceratops
$ ./merc
URL>

You can also supply a URL directly:

$ ./merc gemini.circumlunar.space
Connecting to <gemini.circumlunar.space>
Following redirect to: gemini://gemini.circumlunar.space/
Connecting to <gemini.circumlunar.space>

To visit a Gemini page, enter the URL at the URL> prompt. To go back, enter ‘b’ at the prompt. To quit, enter ‘q’. To search using gus.guru, enter ‘s’ and then enter your query at the SEARCH> prompt. To follow a link, enter the link number and press enter.

Options

  -h, --help
          Prints help end exits
  -d, --dump
          Prints document body and exits
  -w, --width <number>
          Wraps text at <number> columns
  -p, --paginate <number>
          Show <number> of rows at a time.
          Defaults to 50 if no <number> is supplied

Todo

  • Pagination
  • More/better styling in interactive mode
  • Fix “up” (../) links
  • Break out Gemini parser
  • Add start page
  • Fix links on start page
  • Add more todos
  • Add search (gemini://gus.guru/)
  • Fix ‘b’, back works more like cd - now
  • Clean up argument parsing
  • Deno install (merc?)
  • Word wrap for headers when width is set
  • Word wrap for link labels when width is set
  • Implement ‘f’, forward
  • Bookmarks?
  • Handle gopher?
  • Handle downloads?
  • Handle http(s)?

Reference

Gemini specs